<% /* キャプチャエリア内のサンプルの組成を取得 */ %>
mymap.on("move", e => {
<% /* マップの移動・拡大・縮小時に4隅の緯度経度を取得 */ %>
// console.log("moved");
var bounds = mymap.getBounds();
var north = bounds._northEast.lat;
var south = bounds._southWest.lat;
var east = bounds._northEast.lng;
var west = bounds._southWest.lng;
<% /* キャプチャエリア内のサンプル情報を取得 */ %>
capturedSampleList = [];
markerList.forEach(marker => {
if (south<marker.pos[0] && marker.pos[0]<north){
if (west<marker.pos[1] && marker.pos[1]<east){
capturedSampleList.push(marker.name);
}
}
})
console.log(capturedSampleList);
});