关于定位坐标

alian's Avatar

alian

23 Dec, 2016 03:53 PM

1、如何获取当前位置坐标?
2、当地图上有多个marker时,点击某个marker时,如何得知这个marker被选中?或者如何获取点击地图的点的坐标?
非常感谢

  1. Support Staff 1 Posted by service on 24 Dec, 2016 02:59 AM

    service's Avatar

    Hi Alian,
    1. 您可以透過sails.getLongitude sails.getLatitude 取得用戶當前經緯度
    2. sailsmapview當中有一個markermanager可以使用,你可以參考
    https://richjing.gitbooks.io/sails-sdk-maunal/content/Android_SAILS...
    關於點擊選中marker的部分你可以參考我們的sample code 其中MainActivity 1281行的片段程式 https://github.com/richjing/HKIA_Demo/blob/master/hkia/src/main/jav...

    若有任何問題請再提出,謝謝!謝謝!

  2. service closed this discussion on 24 Dec, 2016 02:59 AM.

Discussions are closed to public comments.
If you need help with SAILS SDK please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac