0
GoogleマップのAndroidでのみ、表示領域に表示されるマーカーの数を計算するにはどうすればよいですか?Googleマップの表示領域のマーカー数を取得するandroid
GoogleマップのAndroidでのみ、表示領域に表示されるマーカーの数を計算するにはどうすればよいですか?Googleマップの表示領域のマーカー数を取得するandroid
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を提供してみてください。 :-)