mapbox / mapbox/mapbox-maps-android
Can't set style import position relative to main loaded style
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 578
- Forks
- 161
- PR merge metrics
- No merged PRs in 30d
Description
Environment
- Android OS version:Any
- Devices affected:Any
- Maps SDK Version:Any
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),
)
}
}
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the loadStyle, addStyleImportFromURI, and addStyleImportFromJSON entry points and reproduce the ordering with ImportPosition(null, null, null). Trace how imported styles are positioned relative to the main style; done means establishing whether an import can render above the loaded style and covering the observed behavior with an appropriate verification.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100