-
Notifications
You must be signed in to change notification settings - Fork 9
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
feat: add extra maps #304
feat: add extra maps #304
Conversation
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.
A lot of excess code we should get rid of in this PR.
.env
Outdated
VITE_REACT_APP_MAPBOX_TOKEN= | ||
VITE_REACT_APP_REST_API_BASE_URL=https://developer.trimet.org/ws/v2 | ||
VITE_REACT_APP_REST_API_APP_ID= | ||
VITE_SOME_KEY=hello |
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.
We don't use vite in this project. For env variables we have do define .env in the webpack config https://stackoverflow.com/questions/46224986/how-to-pass-env-file-variables-to-webpack-config
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.
- removed VITE_ prefix in the .env content
- uninstalled "vite"
- installed "dotenv". It seems "@types/dotenv" is deprecated
- updated webpack.dev.config.js
.env.local
Outdated
VITE_REACT_APP_MAPBOX_TOKEN=pk.eyJ1IjoiZHNhdmlub3YiLCJhIjoiY2xsd2VocjRsMjVpbzNwcDhsc3E1ZzAzNiJ9.3xSNq_gwuOMHPUTDkO4OzQ | ||
VITE_REACT_APP_REST_API_BASE_URL=https://developer.trimet.org/ws/v2 | ||
VITE_REACT_APP_REST_API_APP_ID=97B28D2ED40DA08AB53687356 |
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.
Don't push API keys to the codebase. We have to add *.local
to the .gitignore
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.
removed .env.local
package.json
Outdated
@@ -31,24 +38,29 @@ | |||
"@loaders.gl/tiles": "^4.0.0-beta.2", | |||
"@luma.gl/core": "^8.5.14", | |||
"@math.gl/proj4": "^3.6.3", | |||
"@mui/material": "^5.14.13", |
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.
We don't use MUI in this project. Don't port UI components to this project
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.
- removed @mui/material from package.json
- removed loading.tsx, unsupported.tsx
- updated map-wrapper.tsx
package.json
Outdated
"@probe.gl/stats": "^4.0.4", | ||
"@reduxjs/toolkit": "^1.9.5", | ||
"@types/google.maps": "^3.54.4", | ||
"deck.gl": "^8.8.3", |
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.
I like by-module import:
"@deck.gl/arcgis": "^8.9.31",
"@deck.gl/core": "^8.9.31",
"@deck.gl/google-maps": "^8.9.31",
. Remove "deck.gl": "^8.8.3",
then and add all required modules from @deck.gl/...
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.
- removed "deck.gl": "^8.8.3"
- added
"@deck.gl/geo-layers": "^8.9.31",
"@deck.gl/layers": "^8.9.31",
"@deck.gl/mesh-layers": "^8.9.31",
"@deck.gl/react": "^8.9.31",
"@loaders.gl/images": "^4.0.0-beta.2",
"@loaders.gl/schema": "^4.0.0-beta.2",
"apache-arrow": "^13.0.0",
const baseMapProviderId = | ||
baseMapProvider.id === BaseMapProviderId.maplibre | ||
? BaseMapProviderId.maplibre | ||
: BaseMapProviderId.mapbox2; |
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.
Weird expression. If baseMapProvider.id
is not maplibre
, it can be google, arcgis or mapbox2. But it set mapbox2
for all those cases
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.
removed expression. Changed type from String to BaseMapProviderId
@@ -0,0 +1,149 @@ | |||
import { Map as MapboxMap } from "mapbox-gl"; |
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.
We need only overlaid mode. Don't port logic of interleaved mode
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.
removed interleaved-map.tsx
src/components/loading/loading.tsx
Outdated
@@ -0,0 +1,18 @@ | |||
import CircularProgress from "@mui/material/CircularProgress"; |
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.
MUI-related component. We don't need it here
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.
- Removed "@mui/material
- Removed loading .tsx
@@ -0,0 +1,28 @@ | |||
import Paper from "@mui/material/Paper"; |
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.
MUI-related component. We don't need it here
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.
removed unsupported.tsx
@@ -0,0 +1,9 @@ | |||
export const TERRAIN_WITH_SELECTED_BASE_MAP_PROVIDER_IS_NOT_SUPPORTED = ( |
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.
We don't need notification messages in I3S Explorer
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.
removed notification-messages.ts
src/constants/view-states.ts
Outdated
@@ -0,0 +1,21 @@ | |||
export const sfViewState = { |
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.
We don't need those view states. The initial state is already somewhere in this application. We get new view state from the layer when the layer is selected.
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.
removed view-states.ts
No description provided.