我有以下lat / long数组,我可以在地图上成功绘制它。我的问题是如何为每个阵列坐标设置一个循环并放置一个具有自定义Km半径的圆(或标准半径,如果它在4ss中的疼痛太大)。
var locations = [
['lala', 37.0093833333333,24.7528638888889, 1],
['lala', 35.0093833333333,20.7528638888889, 2]
];
谢谢
答案 0 :(得分:2)
var cityCircle
for (elements in your array) {
var populationOptions = {
strokeColor: '#FF0000',
strokeOpacity: 0.8,
strokeWeight: 2,
fillColor: '#FF0000',
fillOpacity: 0.35,
map: map,
center: your latlng,
radius: your radius here
};
// Add the circle for this city to the map.
cityCircle = new google.maps.Circle(populationOptions);
}
这样的事情?