如何在不使用谷歌地图的情况下获取特定城市或街道的纬度和经度? [英] How to get Latitude and Longitude for particular city or street without using google map?

查看:142
本文介绍了如何在不使用谷歌地图的情况下获取特定城市或街道的纬度和经度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在不使用谷歌地图的情况下获取特定城市或街道或位置的纬度和经度?
例如,用户输入的城市名称是Chennai,我只需要显示该城市的纬度和经度。怎么做?

How to get Latitude and Longitude for particular city or street or location without using google map? For example user entered city name is "Chennai" and i need to show only Latitude and Longitude for that city. How to do this?

推荐答案

这叫做地理编码,要求地名匹配纬度和经度。

This is called Geocoding, and requires matching a place name up to a latitude and longitude.

您可以将已知的地名/纬度列表编码到您的应用中,在运行时读取它们并在需要时搜索它们,或者您可以使用在线地理编码服务,如来自雅虎,或来自Google的这一个

You can either code a known list of place name/lat-lons into your app, read them in at runtime and search through them when required, or you can use an online Geocoding service such as this one from Yahoo, or this one from Google.

这篇关于如何在不使用谷歌地图的情况下获取特定城市或街道的纬度和经度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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