谷歌地图api给出的纬度/长度单位

Abs*_*Abs 0 gps units-of-measurement latitude-longitude google-maps-api-3

我给了一个地址谷歌地图api像"21511 CONGRESS SPRINGS RD,Saratoga",api给了我相应的lat/lng这个地址:

latitude=37.252165 and longitude=-122.056565,我需要知道这些纬度和经度的单位,它们是弧度吗?

Suy*_*xit 5

现在他们都是学位.但是你可以通过添加以下代码以弧度转换它们:

google.maps.LatLng.prototype.latRadians = function()
{
   return (Math.PI * this.lat()) / 180;
}
google.maps.LatLng.prototype.lngRadians = function()
{
   return (Math.PI * this.lng()) / 180;
}
Run Code Online (Sandbox Code Playgroud)

要了解有关详情,请访问:https://developers.google.com/maps/documentation/javascript/reference#LatLng

如果您有任何疑问请发表评论.

Suyash