我们可以使用传单js根据纬度和经度输入表获得城市,省和国家/地区名称吗?任何建议我该怎么做
我已经提取了完整的地址:
var geocodeService = L.esri.Geocoding.geocodeService();
marker.on('click', function (e) {
geocodeService.reverse().latlng(e.latlng).run(function (error, result) {
if (error) {
return;
}
document.getElementById('address').value = result.address.Match_addr;
//document.getElementById('address').value = marker.getLatLng().lng;
//L.marker(result.latlng).addTo(marker).bindPopup(result.address.Match_addr).openPopup();
});
});
您找到兄弟了吗?我有相同的代码,我想获得城市名称和国家/地区名称,但我不知道如何。