mirror of
https://github.com/protomaps/PMTiles.git
synced 2026-02-04 10:51:07 +00:00
* fix setting of source when URL is changed after error [#49] * fix setFeatureState when unchecking inspect
This commit is contained in:
@@ -106,7 +106,9 @@ function MapView(props: {
|
||||
map.removeLayer(layer.id);
|
||||
}
|
||||
}
|
||||
map.removeSource("tileset");
|
||||
if ("tileset" in map.getStyle().sources) {
|
||||
map.removeSource("tileset");
|
||||
}
|
||||
};
|
||||
|
||||
const addTileset = async (tileset: Tileset) => {
|
||||
@@ -290,6 +292,7 @@ function MapView(props: {
|
||||
setFrozen(false);
|
||||
} else {
|
||||
for (const hoveredFeature of hoveredFeatures()) {
|
||||
if (hoveredFeature.id === undefined) continue;
|
||||
map.setFeatureState(hoveredFeature, { hover: false });
|
||||
}
|
||||
popup.remove();
|
||||
|
||||
Reference in New Issue
Block a user