This is what happens when I set custom icons to display something different when charge=DUI.
http://www.legalgrab.com/florida_arrest_map3.html notice though, that all other icons are the default google icon. How do I change the default icon but still keep the custom icon charge=DUI? This is where I simply change the default icon, not implementing custom icon: http://www.legalgrab.com/florida_arrest_map.html On Dec 7, 4:34 pm, CroNiX <[email protected]> wrote: > Do you have some sort of test condition to determine when to use which > icon? > > var customIcon = (some test if DUI) ? 'arrestlist/markers/dui.png' : > 'arrestlist/markers/bluesq3.png'; > > var marker = new google.maps.Marker({ > map: map, > position: point, > icon: customIcon > > }); > > On Dec 7, 11:26 am, Ryan Wood <[email protected]> wrote: > > > > > > > > > Hi, > > > I am trying to use custom icons and at the same time change the > > default custom icon. Basically, I want to have my own default icon, > > and at the same time use a different default icon. > > > My current code is: > > > var customIcons = { > > all other than DUI: { > > icon: 'arrestlist/markers/bluesq3.png', > > > }, > > DUI: { > > icon: 'arrestlist/markers/dui.png', > > > } > > }; > > > var marker = new google.maps.Marker({ > > map: map, > > position: point, > > icon: icon.icon > > }); > > > I am trying to use a custom marker for charge=DUI. It works when I use > > icon: icon.icon, but all of my other icons are the default red google > > icon. > > > How can I replace the google default icon, and still use the icon: > > icon.icon code? > > > I have tried searching everywhere but cannot nail it down. > > > Thanks in advance! -- 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.
