How to get the center coordinate of the map(Ext.map) in sencha touch 2?

无人久伴 提交于 2019-12-11 08:20:00

问题


I use an Ext.Map to let a user choose a certain place and I want to get the coordinate (or the coordinate of the map center) that user chooses. Which method should I use? I can't find a proper one in the doc.


回答1:


Check out my answer to similar question given here. This will give you an idea.

  • How Can I Get marker on current location in map in Sencha-Touch2.0

EDIT:

To obtain the position co-ordinates ( i.e latitude and longitude) from the textual address, you will need to use Google Maps Geocoding API

Geocoding is the process of converting addresses (like "1600 Amphitheatre Parkway, Mountain View, CA") into geographic coordinates (like latitude 37.423021 and longitude -122.083739), which you can use to place markers or position the map.



来源:https://stackoverflow.com/questions/10460031/how-to-get-the-center-coordinate-of-the-mapext-map-in-sencha-touch-2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!