【问题标题】:cordova plugin nativegeocoder not defined科尔多瓦插件 nativegeocoder 未定义
【发布时间】:2020-05-05 16:23:29
【问题描述】:

我正在使用 framework7 和 cordova 开发一个移动应用程序。成功使用geolocation插件后,我想添加nativegeocoder,将坐标转换为地址。

getAddress: function(){
      nativegeocoder.reverseGeocode(success, failure, 52.5072095, 13.1452818, { useLocale: true, maxResults: 1 });

      function success(result) {
        var firstResult = result[0];
        console.log("First Result: " + JSON.stringify(firstResult));
      }

      function failure(err) {
        console.log(err);
      }
    }

但我在控制台上显示:ReferenceError: nativegeocoder is not defined 。

有谁知道我该如何解决这个问题? 谢谢!

【问题讨论】:

    标签: cordova plugins geocoding html-framework-7


    【解决方案1】:

    您在控制台上收到此错误,因为浏览器不支持此插件。 尝试构建应用并在安卓设备或模拟器上运行。

    【讨论】:

      猜你喜欢
      • 2016-02-29
      • 1970-01-01
      • 1970-01-01
      • 2018-07-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-10-13
      • 1970-01-01
      相关资源
      最近更新 更多