简体   繁体   English

Google地图中地球视图中的海拔高度参数

[英]Altitude parameter in Earth view on Google Maps

If I go to: 如果我去:

https://www.google.com/maps/@36.9644841,-122.0149787,37m/data=!3m1!1e3?hl=en-US https://www.google.com/maps/@36.9644841,-122.0149787,37m/data=!3m1!1e3?hl=en-US

Please note the 37m parameter after the latitude, longitude. 请注意纬度,经度之后的37米参数。 Now if I modify it to 20m (I guess it means meters) like this: 现在,如果我将其修改为20米(我想这意味着米),就像这样:

https://www.google.com/maps/@36.9644841,-122.0149787,20m/data=!3m1!1e3?hl=en-US https://www.google.com/maps/@36.9644841,-122.0149787,20m/data=!3m1!1e3?hl=en-US

now I get an even closer zoom of that location. 现在我对该位置进行了更近距离的缩放。 I guess it's the height from which the user sees that location... 我猜这是用户看到该位置的高度......

What is the corresponding parameter of this in Google Maps Javascript API? Google Maps Javascript API中相应的参数是什么?

Thanks 谢谢

Google earth API's are already deprecated and will continue to work for next few days. 谷歌地球API已被弃用,并将在未来几天继续使用。

So we are left with Google Maps API only. 因此,我们只使用Google Maps API。 So I will answer according to that only. 所以我只会按照那个回答。

What you are trying to do can be achieved by zoom level in google maps, for example 例如,您可以通过谷歌地图中的缩放级别来实现您要做的事情

var gMap = new google.maps.Map(
    document.getElementById('map-canvas'), 
    { zoom : 14 } //Setting default zoom level
);

//To set map to next zoom level
gMap.setZoom(12);

Check this for more details https://developers.google.com/maps/documentation/javascript/3.exp/reference 有关详情, 查看此处https://developers.google.com/maps/documentation/javascript/3.exp/reference

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM