aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--maps.env1
-rw-r--r--src/client/views/collections/CollectionMapView.scss11
-rw-r--r--src/client/views/collections/CollectionMapView.tsx25
3 files changed, 12 insertions, 25 deletions
diff --git a/maps.env b/maps.env
deleted file mode 100644
index d475c04ad..000000000
--- a/maps.env
+++ /dev/null
@@ -1 +0,0 @@
-REACT_APP_DASH_GOOGLE_MAPS_API_KEY="AIzaSyALJU8DfCAqEAS0OqMDCmkE0otlz4H81fg"
diff --git a/src/client/views/collections/CollectionMapView.scss b/src/client/views/collections/CollectionMapView.scss
index e87c02611..874511533 100644
--- a/src/client/views/collections/CollectionMapView.scss
+++ b/src/client/views/collections/CollectionMapView.scss
@@ -6,19 +6,10 @@
.collectionMapView-contents {
width: 100%;
height: 100%;
+ overflow: hidden;
> div {
position: unset !important; // when the sidebar filter flys out, this prevents the map from extending outside the document box
}
-
- .dash-label {
- position: absolute;
- top: 1rem;
- left: 5rem;
- color: black;
- z-index: 10;
- margin: 0;
- padding: 0;
- }
}
}
diff --git a/src/client/views/collections/CollectionMapView.tsx b/src/client/views/collections/CollectionMapView.tsx
index 2203176de..67864f92f 100644
--- a/src/client/views/collections/CollectionMapView.tsx
+++ b/src/client/views/collections/CollectionMapView.tsx
@@ -87,19 +87,15 @@ export default class CollectionMapView extends CollectionSubView<MapSchema, Goog
return <div className="collectionMapView" ref={this.createDashEventsTarget}>
+ <LoadScript
+ googleMapsApiKey={process.env.GOOGLE_MAPS!}
+ libraries={['places']}
+ >
+ <div className={"collectionMapView-contents"}
+ style={{ pointerEvents: active() ? undefined : "none", overflow: 'hidden' }}
+ onWheel={e => e.stopPropagation()}
+ onPointerDown={e => (e.button === 0 && !e.ctrlKey) && e.stopPropagation()} >
- <div className={"collectionMapView-contents"}
- style={{ pointerEvents: active() ? undefined : "none", overflow: 'hidden' }}
- onWheel={e => e.stopPropagation()}
- onPointerDown={e => (e.button === 0 && !e.ctrlKey) && e.stopPropagation()} >
- <h1 className="dash-label">
- Dash!
- </h1>
- <LoadScript
- // googleMapsApiKey='AIzaSyALJU8DfCAqEAS0OqMDCmkE0otlz4H81fg'
- googleMapsApiKey={process.env.REACT_APP_DASH_GOOGLE_MAPS_API_KEY!}
- libraries={['places']}
- >
<GoogleMap
mapContainerStyle={mapContainerStyle}
zoom={5}
@@ -113,8 +109,9 @@ export default class CollectionMapView extends CollectionSubView<MapSchema, Goog
position={{ lat: 47.617701, lng: -122.359485 }} />
</GoogleMap>
- </LoadScript >
- </div>
+
+ </div>
+ </LoadScript >
</div >;
}