mapbox / mapbox/mapbox-navigation-android
Request: Provide clearing methods for MapboxMap.Style components (Image, Source...)
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 651
- Forks
- 321
- PR merge metrics
- No merged PRs in 30d
Description
**Android API:** 10
**Mapbox Navigation SDK version:**
```
implementation 'com.mapbox.navigation:ui:1.0.0-rc.7'
implementation 'com.mapbox.navigation:core:1.0.0-rc.7'
```
### Why would we like to have this feature?
0. Setup a mapboxMap, a navigation, a navigationMapRoute etc.
1. Add a custom image, source and layer in order to add a marker (Apparently we use this way of adding markers, we don't use the annotation plugin, no idea why)
2. Get re-routed due to a mapbox or an external event
3. Want to clear previous images, sources, layers, etc easily without keeping track of them ourselves.
### Expected behavior
Either a method like `removeImage()` without a parameter or a `removeImages()` or `clearImages` method.
### Actual behavior
There are only `removeImage(name: String)`, ` removeSource(...)`, `removeLayer(...)` methods, which take individual objects.
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 with the MapboxMap.Style APIs for removeImage, removeSource, and removeLayer, and inspect how images, sources, and layers are managed. Define and implement a consistent clearing API for these components, then verify that callers can remove all relevant custom objects without tracking each name individually.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- mobile
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100