【问题标题】:how to perform reverse geocode in angular 7如何在 Angular 7 中执行反向地理编码
【发布时间】:2020-02-26 18:09:31
【问题描述】:

我正在使用 angular-google-map。我正在接收纬度和经度的 JSON 数据。我想获取给定纬度和经度的地址。是否有任何用于反向地理编码的 npm 包。我尝试了反向地理编码,但没有使用。它返回编译错误。 请帮忙

【问题讨论】:

    标签: angular7 angular-google-maps


    【解决方案1】:

    AGM 中的本地地理编码即将推出。代码在master中,等待下一个版本。

    如果您现在需要地理编码,您可以手动完成,等待mapReady 事件

    function geocode() {
       new google.maps.Geocoder.geocode({});
    }
    
    <agm-map (mapReady)="geocode()">
    

    如果您得到google 无法识别,请按照以下方式将@types/googlemaps 添加到package.json Angular2 Cannot find namespace 'google'

    【讨论】:

    • 还有其他的npm包吗。
    猜你喜欢
    • 1970-01-01
    • 2018-05-30
    • 1970-01-01
    • 2010-11-02
    • 2020-08-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-10-31
    相关资源
    最近更新 更多