我正在通过关键字在LatLngBounds数组中搜索地点。
var boundsarr = new Array();
boundsarr[0] = new google.maps.LatLngBounds(
new google.maps.LatLng(25.941886953491675, -80.17411103748543),
new google.maps.LatLng(25.947676224813897, -80.16767330177947)
);
boundsarr[1] = new google.maps.LatLngBounds(
new google.maps.LatLng(25.941886953491675, -80.16767330177947),
new google.maps.LatLng(25.94622890698334, -80.1644544339265)
);
boundsarr[2] = new google.maps.LatLngBounds(
new google.maps.LatLng(25.927413775186118, -80.1644544339265),
new google.maps.LatLng(25.94622890698334, -80.15962613214703)
);
boundsarr[3] = new google.maps.LatLngBounds(
new google.maps.LatLng(25.927413775186118, -80.15962613214703),
new google.maps.LatLng(25.931755728677782, -80.15801669822054)
);
boundsarr[4] = new google.maps.LatLngBounds(
new google.maps.LatLng(25.927413775186118, -80.15801669822054),
new google.maps.LatLng(25.933203046508336, -80.15318839644107)
);
boundsarr[5] = new google.maps.LatLngBounds(
new google.maps.LatLng(25.92886109301667, -80.15318839644107),
new google.maps.LatLng(25.933203046508336, -80.15157896251458)
);
然后在地图上添加标记,加入数组并使用标记数组创建返回的地点列表。 列表中会出现重复条目,我无法弄清原因...例如:http:// jsfiddle.net / 2KrmY / 。 如何防止显示重复项? 非常感谢您的帮助!