Skip to content
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

Use alternate Mapbox error fix #1296

Merged
merged 4 commits into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 2 additions & 22 deletions moped-editor/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 9 additions & 8 deletions moped-editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,18 @@
},
"browserslist": {
"production": [
">0.3%",
"not ie 11",
">0.2%",
"not dead",
"not op_mini all"
"not op_mini all",
"not safari < 10",
"not chrome < 51",
"not android < 5",
"not ie < 12"
],
"development": [
">0.3%",
"not ie 11",
"not dead",
"not op_mini all"
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
Comment on lines -31 to +41
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you

]
},
"dependencies": {
Expand Down Expand Up @@ -96,7 +98,6 @@
"react-scripts": "^5.0.1",
"styled-components": "^5.3.11",
"uuid": "^8.3.2",
"worker-loader": "^3.0.8",
"yup": "^0.29.3"
},
"engines": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,6 @@ import {
import { getClickedFeatureFromMap } from "./utils/onMapClick";
import { useHasMapLoaded } from "./utils/useHasMapLoaded";

// See https://github.com/visgl/react-map-gl/issues/1266#issuecomment-753686953
import mapboxgl from "mapbox-gl";
mapboxgl.workerClass =
// eslint-disable-next-line import/no-webpack-loader-syntax
require("worker-loader!mapbox-gl/dist/mapbox-gl-csp-worker").default;

export default function TheMap({
projectComponents,
allRelatedComponents,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const ProjectSummaryMap = ({ data }) => {
ref={mapRef}
initialViewState={initialViewState}
style={{ width: "100%", height: "60vh" }}
mapStyle={basemaps.streets.mapStyle}
mapStyle={basemaps[basemapKey].mapStyle}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a small fix that I snuck it. The satellite layer in the summary map is working just like in the components map in production, but, in the deploy preview, the layer wouldn't toggle to satellite.

{...mapParameters}
cooperativeGestures={true}
onLoad={onMapLoad}
Expand Down