You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to update the location component to display as the 2nd to top layer, since I noticed that there was a layer or two on top of it at times.
When trying to provide a .layerAbove() to place it right below the top layer, I get
where the aboveLayerId is from a SymbolManager that is created just prior.
I passed the same style to the LocationComponentActivationOptions that uses this options builder that I used to create the SymbolManager.
The location component is the last thing I set up when initializing the map, and I set up all my other SymbolManagers, LineManagers, etc. using the aboveLayerId parameter with no problem, but here I get
When I use the debugger and put a breakpoint before activating the location component, I can see that this symbol layer is in the Style object, and if I even get a layer id from the layers list in the style, it crashes with that too.
Another interesting thing is that it doesn't crash if I use layerBelow(), but it doesn't produce the behavior I expected.
For example, in the following snippet, the LocationComponent would still show below everything else:
val symbolManager1 =SymbolManager(mapView, map, style)
// Put symbolManager2 directly below symbolManager1val symbolManager2 =SymbolManager(mapView, map, style, symbolManager1.layerId)
// Try to put the LocationComponent below symbolManager1val locationComponentOptions =LocationComponentOptions.builder(TopoMapsActivity.instance)
.layerBelow(symbolManager1.layerId)
.accuracyColor(Color.parseColor("#18620f"))
.accuracyAlpha(0.2F)
.build()
// rest of initialization code
I tried using the layer id for the LocationComponent's foreground layer as the layer above symbolManager2 which works, but it has several layers that get spread about so only the foreground layer gets displayed in the right spot.
Am I missing something? I tried just initializing the location component last, thinking that it would be added to the map last and would be displayed on top, but that doesn't work either.
Renderer
No response
Relevant log output
Additional context
No response
The text was updated successfully, but these errors were encountered:
MapLibre Android Version
11.5.1
Android SDK Version
14
Device
Google Pixel 8
What happened?
I wanted to update the location component to display as the 2nd to top layer, since I noticed that there was a layer or two on top of it at times.
When trying to provide a
.layerAbove()
to place it right below the top layer, I getNo matter what layer I pass here, it crashes with the same exception.
Steps to reproduce
I added
.layerAbove()
, as in the following:where the
aboveLayerId
is from a SymbolManager that is created just prior.I passed the same style to the LocationComponentActivationOptions that uses this options builder that I used to create the SymbolManager.
The location component is the last thing I set up when initializing the map, and I set up all my other SymbolManagers, LineManagers, etc. using the
aboveLayerId
parameter with no problem, but here I getWhen I use the debugger and put a breakpoint before activating the location component, I can see that this symbol layer is in the Style object, and if I even get a layer id from the
layers
list in the style, it crashes with that too.Another interesting thing is that it doesn't crash if I use
layerBelow()
, but it doesn't produce the behavior I expected.For example, in the following snippet, the LocationComponent would still show below everything else:
I tried using the layer id for the LocationComponent's foreground layer as the layer above symbolManager2 which works, but it has several layers that get spread about so only the foreground layer gets displayed in the right spot.
Am I missing something? I tried just initializing the location component last, thinking that it would be added to the map last and would be displayed on top, but that doesn't work either.
Renderer
No response
Relevant log output
Additional context
No response
The text was updated successfully, but these errors were encountered: