Android Google Maps resize marker on Zoom

前端 未结 3 1630
没有蜡笔的小新
没有蜡笔的小新 2021-01-21 21:15

I need to display around 30 markers in a somewhat small area.

Is there a way to resize Google Maps API V2 markers when the user changes the zoom?

Or should I jus

3条回答
  •  深忆病人
    2021-01-21 21:40

    I use extends and fitBounds functions and get positions (LatLng) to set a zoom to map items

    //JSP
    
            
        
    
    
    
    //JAVASCRIPT
    
    map = new google.maps.Map(document.getElementById('map-canvas-position'), mapOptions);    
    
    var arrPointMaps = $("[id^=mapPointsPosition_]");
    var limits = new google.maps.LatLngBounds(0,0);
    
    for(var j=0; j

提交回复
热议问题