Open samstamper33 opened 1 year ago
Same for me!
Hi, I found a temporary solution by reloading the Style of the Map after you created your Puck. You can do this by creating in the map event _onStyleDataLoadedListener:
bool refreshAnnotationsOnce = true;
_onStyleDataLoadedListener(StyleDataLoadedEventData data) {
if (kDebugMode) {
print("MapBoxEvent: StyleDataLoadedEventData: begin: ${data.begin}, end: ${data.end}");
//Suppress code when 2DPuck loading is fixed
if (refreshAnnotationsOnce) {
mapboxMap.loadStyleURI(fourUmApp.mapboxMapStyleSatelliteStreet);
refreshAnnotationsOnce = false;
}
}
}
Nice day
Roman
I'm not having too much luck reloading the style. I show the accuracy ring and bearing, but don't show the puck.
any updates on this issue?
I am not able to show the 2D location puck on an android device. Also, puck bearing and pulse are not showing on Apple devices. Here is what I'm using:
_onMapCreated(MapboxMap mapboxMap) { mapboxMap.compass.updateSettings(settings); mapboxMap.setBounds(widget.cameraOptions()); mapboxMap.scaleBar.updateSettings(scaleSettings); mapboxMap.attribution.updateSettings(attributionSettings); this.mapboxMap = mapboxMap; mapboxMap.location.updateSettings(LocationComponentSettings( showAccuracyRing: true, puckBearingEnabled: true, pulsingEnabled: true, locationPuck: LocationPuck(locationPuck2D: LocationPuck2D()))); }
I also have the following in my android manifest:
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />