weex-plugins / Amap-for-Apache-Weex

Amap for Apache Weex is a third party plugin, and is not developed nor maintained by Apache Weex.
Apache License 2.0
92 stars 26 forks source link

定位等插件内方法无法调用 #36

Open Shruan opened 6 years ago

Shruan commented 6 years ago

如题 我在引入weex-amap时在app上 地图可以正常显示,但是在使用定位等方法时 提示xxx is not a function,引入方式

const Amap = weex.requireModule('@weex-module/amap');

setUserLocation() {
      const self = this;
      Amap.getUserLocation(this.$refs.map2017, function (data) {
        if (data.result == 'success') {
          self.pos = data.data.position;
        }
      })
    }