-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stop scroll capture on crash map and upgrade react-map-gl to v7 #1398
Changes from all commits
4d62255
575c9c4
bbbf667
1ed0990
0eed3e3
0b5f4c4
b90a7cc
6144088
9e75b70
af22cb6
67ed1dd
c63da80
369421c
65316a9
9da9886
025110d
ff8bbc3
44e78db
ac98036
2a72d5a
6043754
3127ea9
fd4a03c
c88020c
90c219e
c327643
d6fa913
7c92430
5eb16f4
1625fda
46c5ecc
d79918c
1c98de7
9311e06
6bd8b4b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export const isDev = window.location.hostname === "localhost"; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,25 @@ | ||
import React from "react"; | ||
import { Source, Layer } from "react-map-gl"; | ||
|
||
const TOKEN = process.env.REACT_APP_MAPBOX_TOKEN; | ||
// This API key is managed by CTM. Contact help desk for maintenance and troubleshooting. | ||
const NEARMAP_KEY = process.env.REACT_APP_NEARMAP_KEY; | ||
|
||
export const defaultInitialState = { | ||
latitude: 30.2747, | ||
longitude: -97.7406, | ||
zoom: 17, | ||
}; | ||
|
||
export const mapParameters = { | ||
touchPitch: false, | ||
dragRotate: false, | ||
boxZoom: false, | ||
maxBounds: [[-99, 29], [-96, 32]], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. love the touch of making a bounding box so you cant go exploring the whole planet anymore! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💯 |
||
mapboxAccessToken: TOKEN, | ||
mapStyle: "mapbox://styles/mapbox/satellite-streets-v11", | ||
}; | ||
|
||
export const LOCATION_MAP_CONFIG = { | ||
mapStyle: "mapbox://styles/mapbox/satellite-streets-v11", | ||
sources: { | ||
|
@@ -105,3 +121,11 @@ export const LabeledAerialSourceAndLayer = () => { | |
</> | ||
); | ||
}; | ||
|
||
/** | ||
* Shorten a coordinate to 6 decimal places | ||
* @param {string|number} coordinate - latitude or longitude | ||
* @returns {string} - truncated coordinate | ||
*/ | ||
export const truncateCoordinate = coordinate => | ||
parseFloat(coordinate).toFixed(6); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This package was only used by the unneeded
LocationEditMap
component removed in this PR. It isn't compatible with the newreact-map-gl
version anyways.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✌️