maa*_*aac 2 javascript maps leaflet typescript angular
我正在创建一个使用传单地图的应用程序。我想知道是否有任何外部库可以用来将坐标转换为街道地址?我使用 Angular 6。
这是使用Nominatim 的一个非常简单的可能性。它是 OpenStreetmap 使用的工具。这是所有详细信息的链接:https : //wiki.openstreetmap.org/wiki/Nominatim
这是一个关于如何使用它的示例:
$.get('https://nominatim.openstreetmap.org/reverse?format=jsonv2&lat=47.217954&lon=-1.552918', function(data){
console.log(data.address.road);
});
Run Code Online (Sandbox Code Playgroud)
您只需要用这样的变量替换坐标:
lat='+ latitude +'
Run Code Online (Sandbox Code Playgroud)
如果你想要一个插件:https : //esri.github.io/esri-leaflet/examples/reverse-geocoding.html
| 归档时间: |
|
| 查看次数: |
6910 次 |
| 最近记录: |