开发者

How to resize markers based on zoom level in Google Maps API2?

开发者 https://www.devze.com 2023-01-14 00:46 出处:网络
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:

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?

0

精彩评论

暂无评论...
验证码 换一张
取 消