Yermo / nativescript-mapbox

:statue_of_liberty: :tokyo_tower: :mount_fuji: Native OpenGL powered Maps, by Mapbox
MIT License
194 stars 94 forks source link

showUserLocation not working on Nativescript-Vue #346

Open KryptoBeard opened 4 years ago

KryptoBeard commented 4 years ago

I basically copied the sample, v4.4.1 . Everything else works fine, nothing happens though and no point is made on the map. TrackUser also isn't working, but I'm guessing that is because its not showing my location.

  <Mapbox
    row="1"
    v-if="locationFound"
    accessToken="REDACTED"
    mapStyle="mapbox://styles/mapbox/satellite-v9"
    :latitude="lat"
    :longitude="long"
    hideCompass="false"
    zoomLevel="16"
    showUserLocation="true"
    disableZoom="false"
    disableRotation="false"
    disableScroll="false"
    disableTilt="false"
    @mapReady="onMapReady($event)"
  ></Mapbox>

onMapReady function ...

onMapReady(args) {
  console.log('Map Ready')
  this.map = args.map;
  this.map.trackUser({
     mode: "FOLLOW_WITH_HEADING"
     animated: true
     });
}
keithgulbro commented 4 years ago

@KryptoBeard Please try again, it's working for me with Nativescript Vue after updating to the latest release. @Yermo has been kind enough to submit a massive update to this repo which resolves a lot of issues while offering boat loads more.

KryptoBeard commented 4 years ago

@keithgulbro @Yermo has the npm package been updated? Says 4.4.1 for me still

Yermo commented 4 years ago

@KryptoBeard It's still on my TODO list but I'd like to have some more people test the plugin if possible before I do that.