查询有立交桥的地点 api

query for locations with overpass api

您好,我正在尝试使用建议查询位置(城市、街道等),就像 google 地图上的搜索框、openstreetmap.org 或http://overpass-turbo.eu/ 站点。

谁能帮帮我?

到目前为止我所做的就是这个查询,但我认为这是错误的方法,因为它很慢而且结果很糟糕...

[out:json];
node
  ["name"~"Berlin"]
  ["place"~"city|village|town"];
out body;

openstreetmap.org 和立交桥turbo 处的搜索框使用Nominatim。请参阅维基条目 http://wiki.openstreetmap.org/wiki/Nominatim

以下是overpass turbo查询Nominatim使用的JS脚本:https://github.com/tyrasd/overpass-turbo/blob/master/js/nominatim.js