簡體   English   中英

Here Maps api:如何讓當前中心顯示在 map (JavaScript)

[英]Here Maps api: how to get current center showing on the map (JavaScript)

有沒有辦法檢索 map 上顯示的中心坐標?

用戶可以在map上自由導航,所以中心不斷變化。

如何檢索當前中心?

在JS中, map.getCenter() 在developer.here.com上查看javascript開發人員指南。

      center_latLng = map.getCenter();

      center_lat = center_latLng.lat;

      center_long = center_latLng.lng;

      center_zoom = map.getZoom();

api 醫生在

https://developer.here.com/documentation/maps/3.1.37.0/api_reference/H.Map.html#getZoom

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM