@mapcomponents/react-maplibre 1.3.0 → 1.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/dist/index.cjs.js +143 -96
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +144 -97
- package/dist/index.esm.js.map +1 -1
- package/dist/src/components/MlGpxViewer/util/GeoJsonProvider.d.ts +1 -1
- package/dist/src/components/MlNavigationTools/MlNavigationTools.d.ts +1 -1
- package/dist/src/components/MlSketchTool/MlSketchTool.d.ts +8 -0
- package/dist/src/components/MlWmsLoader/MlWmsLoader.d.ts +1 -1
- package/dist/src/hooks/useFeatureEditor/utils/FeatureEditorStyle.d.ts +0 -28
- package/dist/src/ui_components/LayerList/LayerList.d.ts +1 -1
- package/dist/src/ui_components/LayerList/LayerListFolder.d.ts +3 -3
- package/dist/src/ui_components/LayerList/LayerListItem.d.ts +4 -4
- package/dist/src/ui_components/LayerTree/LayerTreeListItem.d.ts +1 -1
- package/dist/src/util/Instructions.d.ts +1 -1
- package/package.json +5 -2
package/dist/index.esm.js
CHANGED
|
@@ -4,7 +4,7 @@ import React__default, { useMemo, useEffect, useCallback, useState, useRef, useC
|
|
|
4
4
|
import { createTheme, ThemeProvider, styled as styled$2, useTheme } from '@mui/material/styles';
|
|
5
5
|
import { v4 } from 'uuid';
|
|
6
6
|
import 'maplibre-gl/dist/maplibre-gl.css';
|
|
7
|
-
import { Button, CircularProgress, useMediaQuery, FormControl, InputLabel, Select, MenuItem, FormLabel, RadioGroup, FormControlLabel, Radio, styled, List, ListItem, ListItemIcon, IconButton, Checkbox, ListItemText, Grid, Paper, Box as Box$1, Typography, TextField, Slider, Drawer, SwipeableDrawer, Tooltip, Snackbar, DialogTitle as DialogTitle$1, DialogActions as DialogActions$1, ListItemButton, ListItemAvatar, Avatar, DialogContent as DialogContent$1, OutlinedInput, Accordion, AccordionSummary, Dialog as Dialog$1 } from '@mui/material';
|
|
7
|
+
import { Button, CircularProgress, useMediaQuery, FormControl, InputLabel, Select, MenuItem, FormLabel, RadioGroup, FormControlLabel, Radio, styled, List, ListItem, ListItemIcon, IconButton, Checkbox, ListItemText, Grid, Paper, Box as Box$1, Typography, TextField, Slider, Drawer, SwipeableDrawer, Tooltip, Snackbar, FormGroup, DialogTitle as DialogTitle$1, DialogActions as DialogActions$1, ListItemButton, ListItemAvatar, Avatar, DialogContent as DialogContent$1, OutlinedInput, Accordion, AccordionSummary, Dialog as Dialog$1 } from '@mui/material';
|
|
8
8
|
import FilterCenterFocusIcon from '@mui/icons-material/FilterCenterFocus';
|
|
9
9
|
import PrinterIcon from '@mui/icons-material/Print';
|
|
10
10
|
import Button$1 from '@mui/material/Button';
|
|
@@ -103,7 +103,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
103
103
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
104
104
|
PERFORMANCE OF THIS SOFTWARE.
|
|
105
105
|
***************************************************************************** */
|
|
106
|
-
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
106
|
+
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
|
107
107
|
|
|
108
108
|
|
|
109
109
|
var __assign = function() {
|
|
@@ -140,8 +140,8 @@ function __awaiter(thisArg, _arguments, P, generator) {
|
|
|
140
140
|
}
|
|
141
141
|
|
|
142
142
|
function __generator(thisArg, body) {
|
|
143
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
144
|
-
return g =
|
|
143
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
144
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
145
145
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
146
146
|
function step(op) {
|
|
147
147
|
if (f) throw new TypeError("Generator is already executing.");
|
|
@@ -2068,8 +2068,7 @@ function featureEditorStyle() {
|
|
|
2068
2068
|
},
|
|
2069
2069
|
paint: {
|
|
2070
2070
|
'line-color': '#009EE0',
|
|
2071
|
-
'line-width':
|
|
2072
|
-
'line-opacity': 0.2,
|
|
2071
|
+
'line-width': 4,
|
|
2073
2072
|
},
|
|
2074
2073
|
},
|
|
2075
2074
|
{
|
|
@@ -2634,7 +2633,7 @@ var getDefaultPaintPropsByType = function (type, defaultPaintOverrides) {
|
|
|
2634
2633
|
// 'fill-color': 'rgba(10,240,256,0.6)',
|
|
2635
2634
|
// 'fill-outline-color': 'rgba(20,230,256,0.8)',
|
|
2636
2635
|
'fill-color': '#009EE0',
|
|
2637
|
-
'fill-outline-color': '#009EE0'
|
|
2636
|
+
'fill-outline-color': '#009EE0'
|
|
2638
2637
|
};
|
|
2639
2638
|
case 'line':
|
|
2640
2639
|
if (defaultPaintOverrides === null || defaultPaintOverrides === void 0 ? void 0 : defaultPaintOverrides.line) {
|
|
@@ -2646,7 +2645,7 @@ var getDefaultPaintPropsByType = function (type, defaultPaintOverrides) {
|
|
|
2646
2645
|
// 'line-width': 5,
|
|
2647
2646
|
// 'line-blur': 0,
|
|
2648
2647
|
'line-color': '#009EE0',
|
|
2649
|
-
'line-width':
|
|
2648
|
+
'line-width': 4,
|
|
2650
2649
|
'line-blur': 0,
|
|
2651
2650
|
};
|
|
2652
2651
|
case 'circle':
|
|
@@ -4363,6 +4362,23 @@ MlLayerSwipe.defaultProps = {
|
|
|
4363
4362
|
buttonStyle: {},
|
|
4364
4363
|
};
|
|
4365
4364
|
|
|
4365
|
+
function _arrayLikeToArray(r, a) {
|
|
4366
|
+
(null == a || a > r.length) && (a = r.length);
|
|
4367
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
4368
|
+
return n;
|
|
4369
|
+
}
|
|
4370
|
+
function _arrayWithoutHoles(r) {
|
|
4371
|
+
if (Array.isArray(r)) return _arrayLikeToArray(r);
|
|
4372
|
+
}
|
|
4373
|
+
function _iterableToArray(r) {
|
|
4374
|
+
if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
|
|
4375
|
+
}
|
|
4376
|
+
function _nonIterableSpread() {
|
|
4377
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
4378
|
+
}
|
|
4379
|
+
function _toConsumableArray(r) {
|
|
4380
|
+
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
|
|
4381
|
+
}
|
|
4366
4382
|
function _typeof(o) {
|
|
4367
4383
|
"@babel/helpers - typeof";
|
|
4368
4384
|
|
|
@@ -4372,33 +4388,15 @@ function _typeof(o) {
|
|
|
4372
4388
|
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
4373
4389
|
}, _typeof(o);
|
|
4374
4390
|
}
|
|
4375
|
-
function
|
|
4376
|
-
|
|
4377
|
-
|
|
4378
|
-
|
|
4379
|
-
|
|
4380
|
-
}
|
|
4381
|
-
function _iterableToArray(iter) {
|
|
4382
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
4383
|
-
}
|
|
4384
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
4385
|
-
if (!o) return;
|
|
4386
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
4387
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
4388
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
4389
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
4390
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
4391
|
-
}
|
|
4392
|
-
function _arrayLikeToArray(arr, len) {
|
|
4393
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
4394
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
4395
|
-
return arr2;
|
|
4396
|
-
}
|
|
4397
|
-
function _nonIterableSpread() {
|
|
4398
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
4391
|
+
function _unsupportedIterableToArray(r, a) {
|
|
4392
|
+
if (r) {
|
|
4393
|
+
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
4394
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
4395
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
4396
|
+
}
|
|
4399
4397
|
}
|
|
4400
4398
|
|
|
4401
|
-
var
|
|
4399
|
+
var _showNextTransitionSegment2 = function _showNextTransitionSegment(props, map, transitionInProgressRef, transitionGeojsonDataRef, transitionGeojsonCommonDataRef, currentTransitionStepRef, msPerStep, transitionTimeoutRef, setDisplayGeojson) {
|
|
4402
4400
|
var _arguments = arguments;
|
|
4403
4401
|
if (typeof transitionGeojsonDataRef.current[currentTransitionStepRef.current] !== "undefined") {
|
|
4404
4402
|
// if at last transition step set to target geojson
|
|
@@ -4411,7 +4409,7 @@ var _showNextTransitionSegment = function _showNextTransitionSegment(props, map,
|
|
|
4411
4409
|
currentTransitionStepRef.current++;
|
|
4412
4410
|
if (transitionInProgressRef.current && currentTransitionStepRef.current < transitionGeojsonDataRef.current.length) {
|
|
4413
4411
|
transitionTimeoutRef.current = setTimeout(function () {
|
|
4414
|
-
return
|
|
4412
|
+
return _showNextTransitionSegment2.apply(void 0, _toConsumableArray(_arguments));
|
|
4415
4413
|
}, msPerStep);
|
|
4416
4414
|
} else {
|
|
4417
4415
|
if (typeof props.onTransitionEnd === "function") {
|
|
@@ -4501,7 +4499,7 @@ var _transitionToGeojson = function _transitionToGeojson(props, transitionGeojso
|
|
|
4501
4499
|
currentTransitionStepRef.current = 1;
|
|
4502
4500
|
transitionInProgressRef.current = true;
|
|
4503
4501
|
transitionTimeoutRef.current = setTimeout(function () {
|
|
4504
|
-
return
|
|
4502
|
+
return _showNextTransitionSegment2(props, map, transitionInProgressRef, transitionGeojsonDataRef, transitionGeojsonCommonDataRef, currentTransitionStepRef, msPerStep, transitionTimeoutRef, setDisplayGeojson);
|
|
4505
4503
|
}, msPerStep);
|
|
4506
4504
|
};
|
|
4507
4505
|
var createTransitionSteps = function createTransitionSteps(linestringCoordinates, perStepDistance, stepCnt) {
|
|
@@ -7043,6 +7041,10 @@ var MlSketchTool = function (props) {
|
|
|
7043
7041
|
: undefined });
|
|
7044
7042
|
});
|
|
7045
7043
|
};
|
|
7044
|
+
var handleCheckboxChange = function (event) {
|
|
7045
|
+
var _a;
|
|
7046
|
+
(_a = props.onShowInstructionChange) === null || _a === void 0 ? void 0 : _a.call(props, event.target.checked);
|
|
7047
|
+
};
|
|
7046
7048
|
var SketchToolButtons = function () {
|
|
7047
7049
|
return (React__default.createElement(React__default.Fragment, null, sketchTools.map(function (el) {
|
|
7048
7050
|
var stateColor = function (theme) {
|
|
@@ -7074,6 +7076,9 @@ var MlSketchTool = function (props) {
|
|
|
7074
7076
|
} },
|
|
7075
7077
|
React__default.createElement(ButtonGroup, null,
|
|
7076
7078
|
React__default.createElement(SketchToolButtons, null))),
|
|
7079
|
+
React__default.createElement(Box, { sx: { marginTop: '10px' } },
|
|
7080
|
+
React__default.createElement(FormGroup, null,
|
|
7081
|
+
React__default.createElement(FormControlLabel, { control: React__default.createElement(Checkbox, { size: "small", checked: props.showInstruction, onChange: handleCheckboxChange }), label: "Show instructions" }))),
|
|
7077
7082
|
sketchState.drawMode && (React__default.createElement(MlFeatureEditor, { mode: sketchState.drawMode, geojson: sketchState.selectedGeoJson, onChange: function (feature) {
|
|
7078
7083
|
console.log(feature);
|
|
7079
7084
|
if (!(feature === null || feature === void 0 ? void 0 : feature[0]))
|
|
@@ -7118,70 +7123,112 @@ var MlSketchTool = function (props) {
|
|
|
7118
7123
|
setSketchState(function (_sketchState) { return (__assign(__assign({}, _sketchState), { drawMode: undefined, activeGeometryIndex: undefined, selectedGeoJson: undefined })); });
|
|
7119
7124
|
} })),
|
|
7120
7125
|
React__default.createElement(List$1, { sx: { zIndex: 105, marginBottom: '-10px' } },
|
|
7121
|
-
sketchState.geometries.map(function (el) {
|
|
7122
|
-
|
|
7123
|
-
|
|
7124
|
-
React__default.createElement(Box, {
|
|
7125
|
-
|
|
7126
|
-
|
|
7127
|
-
|
|
7128
|
-
|
|
7129
|
-
|
|
7130
|
-
|
|
7131
|
-
|
|
7132
|
-
|
|
7133
|
-
|
|
7134
|
-
|
|
7135
|
-
fill: { 'fill-opacity': 0.5 },
|
|
7136
|
-
} }), type: 'layer', name: String(el.id), description: el.geometry.type }),
|
|
7137
|
-
React__default.createElement(Box, { sx: {
|
|
7138
|
-
padding: '3px 30px',
|
|
7126
|
+
sketchState.geometries.map(function (el, index) {
|
|
7127
|
+
var _a, _b, _c;
|
|
7128
|
+
return (React__default.createElement(React__default.Fragment, null,
|
|
7129
|
+
React__default.createElement(Box, { key: el.id, sx: { display: 'flex', flexDirection: 'column' } },
|
|
7130
|
+
React__default.createElement("br", null),
|
|
7131
|
+
React__default.createElement(Box, { flexDirection: 'row', sx: {
|
|
7132
|
+
'&:hover': {
|
|
7133
|
+
backgroundColor: 'rgb(177, 177, 177, 0.2)',
|
|
7134
|
+
},
|
|
7135
|
+
marginTop: '25px',
|
|
7136
|
+
}, onMouseOver: function () {
|
|
7137
|
+
setHoveredGeometry(el);
|
|
7138
|
+
}, onMouseLeave: function () {
|
|
7139
|
+
setHoveredGeometry(undefined);
|
|
7139
7140
|
} },
|
|
7140
|
-
React__default.createElement(
|
|
7141
|
-
|
|
7142
|
-
|
|
7143
|
-
|
|
7144
|
-
|
|
7145
|
-
|
|
7146
|
-
|
|
7147
|
-
|
|
7148
|
-
|
|
7149
|
-
|
|
7150
|
-
|
|
7151
|
-
|
|
7152
|
-
|
|
7153
|
-
|
|
7154
|
-
|
|
7155
|
-
|
|
7156
|
-
|
|
7157
|
-
|
|
7158
|
-
|
|
7159
|
-
|
|
7160
|
-
|
|
7161
|
-
|
|
7162
|
-
|
|
7163
|
-
|
|
7164
|
-
|
|
7165
|
-
|
|
7166
|
-
|
|
7167
|
-
|
|
7168
|
-
|
|
7169
|
-
|
|
7141
|
+
!((_a = el.properties) === null || _a === void 0 ? void 0 : _a.customName) && (React__default.createElement("input", { type: "text", value: ((_b = el.properties) === null || _b === void 0 ? void 0 : _b.name) || '', placeholder: "Assign name", onChange: function (e) {
|
|
7142
|
+
var newName = e.target.value;
|
|
7143
|
+
setSketchState(function (_sketchState) {
|
|
7144
|
+
var updatedGeometries = __spreadArray([], _sketchState.geometries, true);
|
|
7145
|
+
if (!updatedGeometries[index].properties) {
|
|
7146
|
+
updatedGeometries[index].properties = {};
|
|
7147
|
+
}
|
|
7148
|
+
updatedGeometries[index].properties.name = newName;
|
|
7149
|
+
return __assign(__assign({}, _sketchState), { geometries: updatedGeometries });
|
|
7150
|
+
});
|
|
7151
|
+
}, style: {
|
|
7152
|
+
padding: '5px',
|
|
7153
|
+
border: '1px solid #ccc',
|
|
7154
|
+
borderRadius: '4px',
|
|
7155
|
+
outline: 'none',
|
|
7156
|
+
}, onFocus: function (e) { return (e.target.style.borderColor = '#009ee0'); }, onBlur: function (e) {
|
|
7157
|
+
e.target.style.borderColor = '#ccc';
|
|
7158
|
+
setSketchState(function (_sketchState) {
|
|
7159
|
+
var updatedGeometries = __spreadArray([], _sketchState.geometries, true);
|
|
7160
|
+
if (!updatedGeometries[index].properties) {
|
|
7161
|
+
updatedGeometries[index].properties = {};
|
|
7162
|
+
}
|
|
7163
|
+
updatedGeometries[index].properties.customName = true;
|
|
7164
|
+
return __assign(__assign({}, _sketchState), { geometries: updatedGeometries });
|
|
7165
|
+
});
|
|
7166
|
+
} })),
|
|
7167
|
+
React__default.createElement(LayerListItem, { listItemSx: buttonStyle, configurable: true, layerComponent: React__default.createElement(MlGeoJsonLayer, { mapId: props.mapId, geojson: el, layerId: String(el.id), defaultPaintOverrides: {
|
|
7168
|
+
fill: { 'fill-opacity': 0.5 },
|
|
7169
|
+
} }), type: 'layer', name: React__default.createElement(Typography, { onClick: function () {
|
|
7170
|
+
setSketchState(function (_sketchState) {
|
|
7171
|
+
var updatedGeometries = __spreadArray([], _sketchState.geometries, true);
|
|
7172
|
+
if (!updatedGeometries[index].properties) {
|
|
7173
|
+
updatedGeometries[index].properties = {};
|
|
7174
|
+
}
|
|
7175
|
+
updatedGeometries[index].properties.customName = false;
|
|
7176
|
+
return __assign(__assign({}, _sketchState), { geometries: updatedGeometries });
|
|
7177
|
+
});
|
|
7178
|
+
}, sx: {
|
|
7179
|
+
cursor: 'pointer',
|
|
7180
|
+
overflow: 'hidden',
|
|
7181
|
+
whiteSpace: 'nowrap',
|
|
7182
|
+
} }, ((_c = el.properties) === null || _c === void 0 ? void 0 : _c.name) || String(el.id)), description: el.geometry.type }),
|
|
7183
|
+
React__default.createElement(Box, { sx: {
|
|
7184
|
+
padding: '3px 30px',
|
|
7185
|
+
} },
|
|
7186
|
+
React__default.createElement(ButtonGroup, { size: "small" },
|
|
7187
|
+
React__default.createElement(Tooltip$1, { title: "Center" },
|
|
7188
|
+
React__default.createElement(Button, { sx: __assign({ color: function (theme) { return theme.palette.primary.main; }, backgroundColor: function (theme) { return theme.palette.navigation.navColor; } }, buttonStyle), onClick: function () {
|
|
7170
7189
|
var _a;
|
|
7171
|
-
|
|
7172
|
-
|
|
7173
|
-
|
|
7174
|
-
|
|
7175
|
-
|
|
7176
|
-
|
|
7177
|
-
|
|
7178
|
-
|
|
7179
|
-
|
|
7180
|
-
|
|
7181
|
-
|
|
7182
|
-
|
|
7183
|
-
|
|
7184
|
-
|
|
7190
|
+
(_a = mapHook === null || mapHook === void 0 ? void 0 : mapHook.map) === null || _a === void 0 ? void 0 : _a.map.setCenter(el.geometry.type === 'Point'
|
|
7191
|
+
? el.geometry.coordinates
|
|
7192
|
+
: turf.centerOfMass(el).geometry.coordinates);
|
|
7193
|
+
} },
|
|
7194
|
+
React__default.createElement(GpsFixedIcon, null))),
|
|
7195
|
+
React__default.createElement(Tooltip$1, { title: "Edit" },
|
|
7196
|
+
React__default.createElement(Button, { sx: __assign({ color: function (theme) {
|
|
7197
|
+
var _a;
|
|
7198
|
+
if (sketchState.drawMode === 'simple_select' &&
|
|
7199
|
+
((_a = sketchState.selectedGeoJson) === null || _a === void 0 ? void 0 : _a.id) === el.id) {
|
|
7200
|
+
return theme.palette.navigation.navColor;
|
|
7201
|
+
}
|
|
7202
|
+
else {
|
|
7203
|
+
return theme.palette.primary.main;
|
|
7204
|
+
}
|
|
7205
|
+
}, backgroundColor: function (theme) {
|
|
7206
|
+
var _a;
|
|
7207
|
+
if (sketchState.drawMode === 'simple_select' &&
|
|
7208
|
+
((_a = sketchState.selectedGeoJson) === null || _a === void 0 ? void 0 : _a.id) === el.id) {
|
|
7209
|
+
return theme.palette.primary.main;
|
|
7210
|
+
}
|
|
7211
|
+
else {
|
|
7212
|
+
return theme.palette.navigation.navColor;
|
|
7213
|
+
}
|
|
7214
|
+
} }, buttonStyle), onClick: function () {
|
|
7215
|
+
setSketchState(function (_sketchState) {
|
|
7216
|
+
var _a;
|
|
7217
|
+
var newDrawMode = _sketchState.drawMode === 'simple_select' &&
|
|
7218
|
+
((_a = _sketchState.selectedGeoJson) === null || _a === void 0 ? void 0 : _a.id) === el.id
|
|
7219
|
+
? undefined
|
|
7220
|
+
: 'simple_select';
|
|
7221
|
+
return __assign(__assign({}, _sketchState), { selectedGeoJson: el, activeGeometryIndex: _sketchState.geometries.indexOf(el), drawMode: newDrawMode });
|
|
7222
|
+
});
|
|
7223
|
+
} },
|
|
7224
|
+
React__default.createElement(EditIcon, null))),
|
|
7225
|
+
React__default.createElement(Tooltip$1, { title: "Delete" },
|
|
7226
|
+
React__default.createElement(Button, { sx: __assign({ color: function (theme) { return theme.palette.primary.main; }, backgroundColor: function (theme) { return theme.palette.navigation.navColor; } }, buttonStyle), onClick: function () {
|
|
7227
|
+
removeGeoJson(el);
|
|
7228
|
+
setHoveredGeometry(undefined);
|
|
7229
|
+
} },
|
|
7230
|
+
React__default.createElement(DeleteIcon, null)))))))));
|
|
7231
|
+
}),
|
|
7185
7232
|
hoveredGeometry && (React__default.createElement(MlGeoJsonLayer, { mapId: props.mapId, geojson: { type: 'FeatureCollection', features: [hoveredGeometry] }, layerId: 'highlightBorder', defaultPaintOverrides: {
|
|
7186
7233
|
circle: {
|
|
7187
7234
|
'circle-color': '#000000',
|