【发布时间】:2016-10-18 11:27:35
【问题描述】:
我正在尝试使用 Google Map API Reference 创建矩形地理围栏。使用这个 API 我得到了:
- 东北经纬度
- 西南纬度和经度
但对于我的项目,我想要所有 4 Vertex Lat。 & 长。坐标。请帮助我实现这一目标。任何帮助将不胜感激。
【问题讨论】:
标签: google-maps google-maps-api-3 maps gis google-maps-api-2
我正在尝试使用 Google Map API Reference 创建矩形地理围栏。使用这个 API 我得到了:
但对于我的项目,我想要所有 4 Vertex Lat。 & 长。坐标。请帮助我实现这一目标。任何帮助将不胜感激。
【问题讨论】:
标签: google-maps google-maps-api-3 maps gis google-maps-api-2
如果你有NE,SW
North-East Latitude & Longitude = north_lat, east_lng
South-West Latitude & Longitude = south_lat, west_lng
你有 rect coord ..
在伪代码中
rectangle coord = (north_lat, west_lng)
(north_lat, east_lng)
(south_lat, east_lng)
( south_lat, west_lng)
or using eg: the coords
var bounds = {
north: 44.599,
south: 44.490,
east: -78.443,
west: -78.649
};
你可以使用矩形
rectangle = new google.maps.Rectangle({
bounds: bounds
});
【讨论】: