Skip to content

Commit 2069ff1

Browse files
committed
map click deselects
1 parent 5d0cc89 commit 2069ff1

1 file changed

Lines changed: 6 additions & 10 deletions

File tree

src/map/map.ts

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,12 @@ export const initMap = (params: MapParameters) => {
3333
const { config } = params;
3434
const { poiTracker, locationController } = params.providers;
3535

36-
const map = L.map("map", config.mapOptions).setView(
37-
config.initialLocation,
38-
config.initialZoom,
39-
);
40-
41-
// this conflicts with bounds overlays. TODO
42-
//.on("click", () => {
43-
// // deselect the active POI when the user clicks outside on the map
44-
// //poiTracker.deselectActive();
45-
//});
36+
const map = L.map("map", config.mapOptions)
37+
.setView(config.initialLocation, config.initialZoom)
38+
.on("click", () => {
39+
// deselect the active POI when the user clicks outside on the map
40+
poiTracker.deselectActive();
41+
});
4642

4743
config.defaultLayer.addTo(map);
4844

0 commit comments

Comments
 (0)