如何在sencha touch 2中获取地图的中心坐标(Ext.map)? [英] How to get the center coordinate of the map(Ext.map) in sencha touch 2?

查看:120
本文介绍了如何在sencha touch 2中获取地图的中心坐标(Ext.map)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Ext.Map让用户选择某个地方,并且我想要获取用户选择的坐标(或地图中心的坐标)。我应该使用哪种方法?

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.

推荐答案

请查看我在此给出的类似问题的答案。这将给你一个想法。

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

编辑

获取职位从文本地址坐标(即经纬度),您将需要使用 Google Maps Geocoding API

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


地理编码是转换地址的过程(如1600
地理坐标
(如纬度37.423021和经度-122.083739),您可以使用
放置标记或放置地图。

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.

这篇关于如何在sencha touch 2中获取地图的中心坐标(Ext.map)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆