nativescript-community/ui-mapbox

Add getSource() method to plugin

Opened this issue · 0 comments

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.