tags:

views:

12

answers:

0

I'm trying to resize markers based on zoom level in Google Maps API 2.

I tried with this code and it's not working:

    tinyIcon.iconSize = new GSize(30, 30);
GEvent.addListener(map, "zoomend", function() { 
    var zoom = map.getZoom();
    if (zoom > 10) {
        tinyIcon.iconSize = new GSize(50, 50);
    } else {
        tinyIcon.iconSize = new GSize(30, 30);
    }   
});     

Anyone have any other idea?