From b0872130aca36c790e4279866582af224ed763ba Mon Sep 17 00:00:00 2001 From: bobzel Date: Sat, 16 Dec 2023 21:27:24 -0500 Subject: added pinch zooming for maps, fixed sizing of search bar when zoomed in, turned off some unneeded widgets that don't locate properly when zoomed in. --- src/client/views/nodes/MapBox/MapBox.scss | 3 +++ src/client/views/nodes/MapBox/MapBox.tsx | 10 ++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'src/client') diff --git a/src/client/views/nodes/MapBox/MapBox.scss b/src/client/views/nodes/MapBox/MapBox.scss index 1d27167f0..b3ce55786 100644 --- a/src/client/views/nodes/MapBox/MapBox.scss +++ b/src/client/views/nodes/MapBox/MapBox.scss @@ -9,6 +9,9 @@ .mapboxgl-map { overflow: unset !important; } + .mapboxgl-ctrl { + display: none !important; + } .mapBox-infoWindow { background-color: white; diff --git a/src/client/views/nodes/MapBox/MapBox.tsx b/src/client/views/nodes/MapBox/MapBox.tsx index efe0a3620..b627ba459 100644 --- a/src/client/views/nodes/MapBox/MapBox.tsx +++ b/src/client/views/nodes/MapBox/MapBox.tsx @@ -1501,6 +1501,9 @@ export class MapBox extends ViewBoxAnnotatableComponent (this.dataDoc.map_zoom = e.viewState.zoom); + @action onMapMove = (e: ViewStateChangeEvent) => { this.dataDoc.longitude = e.viewState.longitude; @@ -1508,9 +1511,7 @@ export class MapBox extends ViewBoxAnnotatableComponent { - this.showTerrain = !this.showTerrain; - }; + toggleShowTerrain = () => (this.showTerrain = !this.showTerrain); getMarkerIcon = (pinDoc: Doc): JSX.Element | null => { const markerType = StrCast(pinDoc.markerType); @@ -1555,7 +1556,7 @@ export class MapBox extends ViewBoxAnnotatableComponent +
this.handleSearchChange(e.target.value)} /> } type={Type.TERT} onClick={e => this.toggleSettings()} />
@@ -1651,6 +1652,7 @@ export class MapBox extends ViewBoxAnnotatableComponent