nativescript-community / nativescript-community/ui-mapbox
Add getSource() method to plugin
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 38
- Forks
- 26
- PR merge metrics
- No merged PRs in 30d
Description
Hi, it's possible to add getSource() MapBox method to the plugin?
I have some problems when I remove sources. Mapbox returns a error message "Could not remove source with id: mySourceId". I need to know if the source exits in the map instance.
Example
export const deleteSource = (id: string): void => {
const source = map.getSource(id)
!!source ? map.removeSource(id) : console.log('No source")
}
Thanks in advance.
Contributor guide
No contributing guide indexed for this repository
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 by locating the plugin's existing Mapbox method wrappers and the removeSource entry point, then compare how source-related methods are exposed. Add the requested getSource() capability and verify that callers can determine whether a source exists before removal.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- mobile
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100