Skip to content

Commit

Permalink
Decompose map startup, move map into context, and refactor draw tools (
Browse files Browse the repository at this point in the history
…#3761)

* Decompose map startup, move map into context, and refactor draw tools

* fix auth issue, mode ref issues

* fix conflicts

* fix line styles

* fix line width buffer
  • Loading branch information
plasticviking authored Jan 21, 2025
1 parent fba8798 commit a873dd2
Show file tree
Hide file tree
Showing 28 changed files with 1,025 additions and 650 deletions.
14 changes: 12 additions & 2 deletions app/package-lock.json

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

4 changes: 2 additions & 2 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@capacitor/geolocation": "^6.0.1",
"@capacitor/ios": "^6.1.2",
"@ionic/pwa-elements": "^3.3.0",
"@mapbox/mapbox-gl-draw": "^1.4.3",
"@mapbox/mapbox-gl-draw": "^1.5.0",
"@mui/icons-material": "^5.16.7",
"@mui/material": "^5.16.7",
"@mui/x-data-grid": "^6.19.11",
Expand All @@ -47,7 +47,6 @@
"@turf/inside": "^5.0.0",
"@turf/line-to-polygon": "^6.5.0",
"@turf/turf": "^6.5.0",
"@types/mapbox__mapbox-gl-draw": "^1.4.7",
"@types/proj4": "^2.5.5",
"@xmldom/xmldom": "^0.8.10",
"async": "^3.2.6",
Expand Down Expand Up @@ -105,6 +104,7 @@
"@types/geojson": "^7946.0.14",
"@types/jest": "^29.5.13",
"@types/lodash.debounce": "^4.0.9",
"@types/mapbox__mapbox-gl-draw": "^1.4.8",
"@types/node": "^20.11.16",
"@types/react": "^18",
"@types/react-dom": "^18",
Expand Down
2 changes: 1 addition & 1 deletion app/src/UI/LegacyMap/Controls/PrimaryLayerSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useDispatch } from 'react-redux';
import { IconButton, Tooltip } from '@mui/material';
import { useSelector } from 'utils/use_selector';
import 'UI/Global.css';
import { MAP_DEFINITIONS } from 'UI/LegacyMap/helpers/layer-definitions';
import { MAP_DEFINITIONS } from 'UI/LegacyMap/helpers/functional/layer-definitions';
import { DeviceUnknown, Hd, Landscape, Map, SaveAlt, Sd, SignalCellularNodata } from '@mui/icons-material';
import MapActions from 'state/actions/map';

Expand Down
9 changes: 9 additions & 0 deletions app/src/UI/LegacyMap/InvasivesMap.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import maplibregl, { MapOptions } from 'maplibre-gl';

class InvasivesMap extends maplibregl.Map {
constructor(options: MapOptions) {
super(options);
}
}

export { InvasivesMap };
3 changes: 2 additions & 1 deletion app/src/UI/LegacyMap/LayerPicker/LayerPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { MOBILE } from 'state/build-time-config';
import LayersIcon from '@mui/icons-material/Layers';
import CloseIcon from '@mui/icons-material/Close';
import { IconButton, Switch } from '@mui/material';
import './LayerPicker.css';
import { useState } from 'react';
import LpModules from 'constants/LpModules';
import LayerPickerPathOption from './LayerPickerPathRow';
Expand All @@ -14,6 +13,8 @@ import Accordion from 'UI/Accordion/Accordion';
import { useDispatch, useSelector } from 'utils/use_selector';
import UserSettings from 'state/actions/userSettings/UserSettings';

import './LayerPicker.css';

export const LayerPicker = () => {
const closeLayerPicker = () => {
setShowLayerPicker(false);
Expand Down
Loading

0 comments on commit a873dd2

Please sign in to comment.