Open AlbertoNoris opened 2 weeks ago
@AlbertoNoris The location indicator layer is not added to the style until the first location update is reported by the platform, to avoid this error you can check if the layer exists in the style before trying to access it - styleLayerExists()
.
On iOS (haven't tested Android) when trying to get the position of the user with the provided code in the example
as soon as the map is created then this error is thrown:
PlatformException (PlatformException(StyleError(rawValue: "Layer puck is not in style"), null, null, null))
Before updating to 1.1.0 from a pre 1.0.0 version this issue wasn't there; trying to get the position slightly after the map creation doesn't yield the Exception.