Don't remove source and layer on unregister

I'm not convinced this is necessary since we are freeing the map itself
and its causing a crash on navigation away.
This commit is contained in:
Eli Ribble 2026-04-23 23:46:54 +00:00
parent 77283b3654
commit c1a8249dc0
No known key found for this signature in database

View file

@ -57,10 +57,12 @@ provide("registerSource", (id: string, config: any) => {
provide("unregisterSource", (id: string) => {
console.log("unregister source", id);
/*
sources.delete(id);
if (map.value && map.value?.getSource(id)) {
map.value.removeSource(id);
}
*/
});
provide("registerLayer", (id: string, config: any) => {
@ -75,10 +77,12 @@ provide("registerLayer", (id: string, config: any) => {
provide("unregisterLayer", (id: string) => {
console.log("unregister layer", id);
/*
layers.delete(id);
if (map.value?.getLayer(id)) {
map.value.removeLayer(id);
}
*/
});
function initializeMap() {