Larry, I've got it, finally ! Thank you so much for your time and, patience.
Kind regards Chris On 10 December 2011 15:32, [email protected] <[email protected]>wrote: > On Dec 10, 7:20 am, IR HM <[email protected]> wrote: > > Hi Larry, forgive me for not grasping this particulalry well. > > > > But isn't this line 'function createMarker2(latlng, sitedescription, > > sitetype) {' setting the arguments, which I then use here? > > Yes. But look at the place in your code where you _call_ the > function. What is the value specified for the third argument? > > var marker2 = createMarker2(latlng, sitedescription); > > Larry > > > > > var html2 = "<b>" + sitedescription + "</b> <br/>"; > > var icon = customIcons[sitetype] || {}; > > var marker2 = new google.maps.Marker({ > > map: map, > > icon: icon.icon, > > shadow: icon.shadow, > > position: latlng > > Many thanks and kind regards > > > > Chris > > On 9 December 2011 22:37, [email protected] <[email protected]> > wrote: > > > > > > > > > > > > > > > > > On Dec 9, 6:27 am, IR HM <[email protected]> wrote: > > > > Hi Larry,many thanks for replying to my post. > > > > > > I'm a little new to this, so could you perhaps elaborate please, as > I'm a > > > > little unsure as to what you mean. > > > > > If you write a javascript function foo(a,b,c) { do stuff with a,b,c } > > > and call it with 2 arguments, you won't get an error, but inside the > > > function the value of c will be null. > > > > > That is what you are doing. > > > > > -- Larry > > > > > > Kind regards > > > > > > Chris > > > > > > On 7 December 2011 19:57, [email protected] <[email protected] > > > > > wrote: > > > > > > > On Dec 7, 7:22 am, IR HM <[email protected]> wrote: > > > > > > I wonder whether someone may be able to help me please. > > > > > > > > I'm trying to use custom icons on > > > > > > this< > http://www.mapmyfinds.co.uk/development/mylocationstest.html> > > > > > > page > > > > > > but I've come up against a problem. The page uses two php files > to > > > > > retrieve > > > > > > it's data and it's the custom icons from the second file that I > can't > > > > > seem > > > > > > to show on my map. I know the formatting on the page at the > moment > > > isn't > > > > > > great, but this is just a test file. To see the problem I'm > having, > > > > > select > > > > > > the blue link called 'Test Location 2', leave the drop down menu > > > value at > > > > > > '5' and click 'Search Location'. > > > > > > > > I can get the custom icons working for these: > > > > > > > > "Finds made": { > > > > > > icon: 'location-marker2.png', > > > > > > shadow: 'location-marker2-shadow.png'}, > > > > > > > > "No finds made": { > > > > > > icon: 'location-marker1.png', > > > > > > shadow: 'location-marker1-shadow.png' > > > > > > > > }, > > > > > > > > Which take their data from the first php file, but the set from > the > > > > > second > > > > > > file (shown below), don't appear on the map, I just get the > default > > > > > google > > > > > > marker. > > > > > > > > "Battlefield": { > > > > > > icon: 'battle-marker.png', > > > > > > shadow: 'battle-marker-shadow.png' > > > > > > }, > > > > > > "Monument": { > > > > > > icon: 'artifact-marker.png', > > > > > > shadow: 'artifact-marker-.png' > > > > > > > > } > > > > > > }; > > > > > > > > The markers are created within this function: > > > > > > > > function createMarker2(latlng, sitedescription, sitetype) { > > > > > > > > I've tried all manner of different positions within this code to > set > > > the > > > > > > custom icon variable, but I just can't get it to work. I've even > > > tried to > > > > > > create a var customIcons2, but this doesn't work either. > > > > > > > > I just wondered whether someone could have a look at this please > and > > > let > > > > > me > > > > > > know what I'm doing wrong. > > > > > > > When you call the createMarker2 function in your code, you never > pass > > > > > a third argument in to it. > > > > > (when you leave it out it uses "null" for sitetype) > > > > > > > -- Larry > > > > > > > > Many thanks kind regards > > > > > > > -- > > > > > You received this message because you are subscribed to the Google > > > Groups > > > > > "Google Maps JavaScript API v3" group. > > > > > To post to this group, send email to > > > > > [email protected]. > > > > > To unsubscribe from this group, send email to > > > > > [email protected]. > > > > > For more options, visit this group at > > > > >http://groups.google.com/group/google-maps-js-api-v3?hl=en. > > > > > -- > > > You received this message because you are subscribed to the Google > Groups > > > "Google Maps JavaScript API v3" group. > > > To post to this group, send email to > > > [email protected]. > > > To unsubscribe from this group, send email to > > > [email protected]. > > > For more options, visit this group at > > >http://groups.google.com/group/google-maps-js-api-v3?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "Google Maps JavaScript API v3" group. > To post to this group, send email to > [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/google-maps-js-api-v3?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.
