mapbox / mapbox-maps-android

Interactive, thoroughly customizable maps in native Android powered by vector tiles and OpenGL.
https://www.mapbox.com/mobile-maps-sdk
Other
478 stars 134 forks source link

Can't set style import position relative to main loaded style #2478

Open SamYStudiO opened 2 months ago

SamYStudiO commented 2 months ago

Environment

Observed behavior and steps to reproduce

Imported style using addStyleImportFromURI or addStyleImportFromJSON are always shown below main style loaded using loadStyle, Setting ImportPosition when using addStyleImportFromURI with null values to set it on top has no effect.

Is there any way to have imported style to be on top on main loaded style?

// Load main style
mapboxMap.loadStyle(styleUrl) {
        // Add new overlays over main style > are invisible beacause always show below main style....
        overlays.forEach { overlay ->
                mapboxMap.addStyleImportFromURI(
                    overlay.id,
                    overlay.styleUrl,
                    null,
                    ImportPosition(null, null, null),
                )
            }
        }
     }