2016-08-11 30 views

答えて

2
var markers; //your markers 
var map; //your map 
var countInBoundingBox = 0; //the counter for the markers in bounding box 

for (var i = markers.length, bounds = map.getBounds(); i--;) { 
    if (bounds.contains(markers[i].getPosition())) { 
    countInBoundingBox++; 
    } 
} 

次回はMinimal, Complete, and Verifiable exampleを提供してみてください。 :-)

関連する問題