我想知道是否可以在 Google map 中放置一个半径定界符!? 例如:我选择了一个地区或城市,半径为 5 英里,分隔符增加,绘制它!
请考虑这个例子:我选择“阿姆斯特丹”作为地点,然后我加上 5 公里,它会返回“阿姆斯特丹”加上 5 公里半径的结果
http://www.funda.nl/koop/amsterdam/+5km/
我的问题是我不明白如何将 5 公里添加到“阿姆斯特丹”,因为它不能成为中心点 - 我想我需要“阿姆斯特丹”区域的分隔符。这是否存在于 Google map API 或任何其他 API 中?
最佳答案
更新:
根据您的要求,我认为上面的链接会对您有所帮助。
试试这个,
// Create marker
var marker = new google.maps.Marker({
map: map,
position: new google.maps.LatLng(39.7433,-104.9872),
title: 'Some location'
});
// Add circle overlay and bind to marker
var circle = new google.maps.Circle({
map: map,
radius: 8047, // 5 miles in metres
fillColor: '#AA0000'
});
circle.bindTo('center', marker, 'position');
引用: http://seriouscodage.blogspot.in/2010/11/visualizing-data-as-circles-in-google.html
关于javascript - 谷歌地图半径,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10497090/