我正试图远离所有的谷歌产品。
对于地图,我使用的是AngularJS 1.x和传单。
我惊讶地发现,传单不支持地理编码,在那里我传递一个地址,得到一个纬度/经度。我需要这样才能在地图上添加标记。
我正在寻找一个地理编码器,它:
你能推荐些什么?
发布于 2019-04-05 08:54:12
OpenStreetMap,即免费供商业使用,有一个名为诺米纳蒂姆的地理编码工具。它的API基于HTTP,您可以选择返回不同的格式(例如,JSON、XML)。
例如,以堆栈溢出的纽约地址为例。在浏览器中打开以下URL:https://nominatim.openstreetmap.org/search?q=110+william+street,+new+york&format=json
您将得到以下结果:
[
{
"place_id": 140185133,
"licence": "Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright",
"osm_type": "way",
"osm_id": 278078924,
"boundingbox": [
"40.7084229",
"40.7091243",
"-74.0071802",
"-74.0062953"
],
"lat": "40.7087755",
"lon": "-74.0067691170635",
"display_name": "110 William Street, 110, William Street, Financial District, Manhattan, Manhattan Community Board 1, New York County, New York City, New York, 10038, USA",
"class": "building",
"type": "yes",
"importance": 0.511
}
]https://softwarerecs.stackexchange.com/questions/57703
复制相似问题