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.
