icon according the zoom factor
With the API v开发者_StackOverflow中文版ersion 3, How to change the size of an icon (created with MarkerImage) according to the zoom factor of the map ? I suppose I must use scaledSize and map.getZoom() ?
This is code cut and free hand written from the api documentation but it might give you an idea where to start
google.maps.event.addListener(map, 'zoom_changed', function() {
yourMarker.setIcon("path to your icon here");
});
If you need to change all the icons on the map I would suggest putting them in an array and loop over them doing setIcon()
精彩评论