You can add an event listener to the map listening for the 'zoomend' event, the event listener will be passed two arguments - the last zoom level and the new zoom level.
http://code.google.com/apis/maps/documentation/reference.html#GEvent http://code.google.com/apis/maps/documentation/reference.html#GMap2.zoomend Now if you want to change the icon image you can use the GMarker method setImage(). http://code.google.com/apis/maps/documentation/reference.html#GMarker.setImage BUT the new image will be sized to the size of the original image used when the GMarker was created. So if you originally create a GMarker with an icon image of 32 x 32 pixels and replace that image - using the setImage() method - with an image of 16 x 16 pixels then that 16 x 16 pixel image will be sized to 32 x 32. There's no workaround - there's a feature request to support changing images with image sof a different size but it's not been implemented yet: http://code.google.com/p/gmaps-api-issues/issues/detail?id=110 Martin. On 20 Feb, 23:13, Dave <[email protected]> wrote: > Does the Google maps API support the ability to define multiple icons > for a single marker? > > Currently, the app is working fine, but our customer would like to > have multiple icons for each marker; so smaller icons are used at > lower zoom levels and a larger set of icons for higher zoom levels. My > attempts at achieving this have been entirely unsuccessful, and I'm > wondering if it's even possible. I have not seen any Google maps sites > that have this feature; the closest living example appears to be icon > layers, which still maintain a 1:1 marker-to-icon relationship. > > http://www.woosamonsa.com > > I'd like to know whether or not this is doable. > > Thanks in advance. -- You received this message because you are subscribed to the Google Groups "Google Maps API" 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-api?hl=en.
