@jupytergis/base 0.5.0 → 0.6.0
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/lib/annotations/components/Annotation.d.ts +2 -2
- package/lib/annotations/components/Annotation.js +3 -3
- package/lib/annotations/components/AnnotationFloater.d.ts +1 -1
- package/lib/annotations/components/AnnotationFloater.js +2 -2
- package/lib/annotations/components/Message.d.ts +2 -1
- package/lib/annotations/components/Message.js +3 -3
- package/lib/annotations/model.js +5 -5
- package/lib/commands/BaseCommandIDs.d.ts +32 -0
- package/lib/commands/BaseCommandIDs.js +43 -0
- package/lib/{commands.d.ts → commands/index.d.ts} +1 -1
- package/lib/{commands.js → commands/index.js} +59 -99
- package/lib/console/consoleview.d.ts +3 -3
- package/lib/console/consoleview.js +5 -5
- package/lib/constants.d.ts +2 -36
- package/lib/constants.js +5 -47
- package/lib/dialogs/ProcessingFormDialog.d.ts +4 -4
- package/lib/dialogs/ProcessingFormDialog.js +9 -11
- package/lib/dialogs/layerBrowserDialog.d.ts +1 -1
- package/lib/dialogs/layerBrowserDialog.js +7 -7
- package/lib/dialogs/layerCreationFormDialog.d.ts +4 -4
- package/lib/dialogs/layerCreationFormDialog.js +6 -6
- package/lib/dialogs/symbology/components/color_ramp/CanvasSelectComponent.d.ts +1 -1
- package/lib/dialogs/symbology/components/color_ramp/CanvasSelectComponent.js +3 -3
- package/lib/dialogs/symbology/components/color_ramp/ColorRamp.d.ts +3 -2
- package/lib/dialogs/symbology/components/color_ramp/ColorRamp.js +6 -7
- package/lib/dialogs/symbology/components/color_ramp/ColorRampEntry.d.ts +1 -1
- package/lib/dialogs/symbology/components/color_ramp/ColorRampEntry.js +1 -1
- package/lib/dialogs/symbology/components/color_ramp/ModeSelectRow.d.ts +1 -1
- package/lib/dialogs/symbology/components/color_ramp/ModeSelectRow.js +1 -1
- package/lib/dialogs/symbology/components/color_stops/StopContainer.d.ts +2 -2
- package/lib/dialogs/symbology/components/color_stops/StopContainer.js +4 -4
- package/lib/dialogs/symbology/components/color_stops/StopRow.d.ts +3 -3
- package/lib/dialogs/symbology/components/color_stops/StopRow.js +2 -2
- package/lib/dialogs/symbology/hooks/useGetBandInfo.js +5 -5
- package/lib/dialogs/symbology/hooks/useGetProperties.d.ts +1 -1
- package/lib/dialogs/symbology/hooks/useGetProperties.js +4 -4
- package/lib/dialogs/symbology/symbologyDialog.d.ts +8 -0
- package/lib/dialogs/symbology/symbologyDialog.js +1 -1
- package/lib/dialogs/symbology/symbologyUtils.js +38 -31
- package/lib/dialogs/symbology/tiff_layer/TiffRendering.d.ts +2 -2
- package/lib/dialogs/symbology/tiff_layer/TiffRendering.js +2 -2
- package/lib/dialogs/symbology/tiff_layer/components/BandRow.d.ts +2 -2
- package/lib/dialogs/symbology/tiff_layer/components/BandRow.js +4 -4
- package/lib/dialogs/symbology/tiff_layer/types/MultibandColor.d.ts +2 -2
- package/lib/dialogs/symbology/tiff_layer/types/MultibandColor.js +30 -20
- package/lib/dialogs/symbology/tiff_layer/types/SingleBandPseudoColor.d.ts +2 -2
- package/lib/dialogs/symbology/tiff_layer/types/SingleBandPseudoColor.js +23 -21
- package/lib/dialogs/symbology/vector_layer/VectorRendering.d.ts +2 -2
- package/lib/dialogs/symbology/vector_layer/VectorRendering.js +81 -39
- package/lib/dialogs/symbology/vector_layer/components/ValueSelect.d.ts +1 -1
- package/lib/dialogs/symbology/vector_layer/components/ValueSelect.js +1 -1
- package/lib/dialogs/symbology/vector_layer/types/Canonical.d.ts +4 -0
- package/lib/dialogs/symbology/vector_layer/types/Canonical.js +66 -0
- package/lib/dialogs/symbology/vector_layer/types/Categorized.d.ts +2 -2
- package/lib/dialogs/symbology/vector_layer/types/Categorized.js +142 -47
- package/lib/dialogs/symbology/vector_layer/types/Graduated.d.ts +2 -2
- package/lib/dialogs/symbology/vector_layer/types/Graduated.js +193 -99
- package/lib/dialogs/symbology/vector_layer/types/Heatmap.d.ts +2 -2
- package/lib/dialogs/symbology/vector_layer/types/Heatmap.js +7 -6
- package/lib/dialogs/symbology/vector_layer/types/SimpleSymbol.d.ts +2 -2
- package/lib/dialogs/symbology/vector_layer/types/SimpleSymbol.js +33 -30
- package/lib/formbuilder/creationform.js +3 -3
- package/lib/formbuilder/editform.js +3 -3
- package/lib/formbuilder/formselectors.d.ts +1 -1
- package/lib/formbuilder/formselectors.js +2 -2
- package/lib/formbuilder/objectform/baseform.d.ts +5 -4
- package/lib/formbuilder/objectform/baseform.js +16 -14
- package/lib/formbuilder/objectform/fileselectorwidget.d.ts +1 -1
- package/lib/formbuilder/objectform/fileselectorwidget.js +5 -5
- package/lib/formbuilder/objectform/layer/heatmapLayerForm.js +2 -2
- package/lib/formbuilder/objectform/layer/hillshadeLayerForm.js +1 -1
- package/lib/formbuilder/objectform/layer/layerform.d.ts +1 -1
- package/lib/formbuilder/objectform/layer/layerform.js +3 -2
- package/lib/formbuilder/objectform/process/dissolveProcessForm.d.ts +1 -1
- package/lib/formbuilder/objectform/process/dissolveProcessForm.js +5 -5
- package/lib/formbuilder/objectform/source/geojsonsource.js +4 -4
- package/lib/formbuilder/objectform/source/geotiffsource.js +4 -4
- package/lib/formbuilder/objectform/source/pathbasedsource.js +6 -6
- package/lib/formbuilder/objectform/source/sourceform.d.ts +1 -1
- package/lib/formbuilder/objectform/source/sourceform.js +1 -1
- package/lib/formbuilder/objectform/source/tilesourceform.js +3 -3
- package/lib/gdal.js +2 -2
- package/lib/icons.js +29 -29
- package/lib/index.d.ts +4 -3
- package/lib/index.js +4 -3
- package/lib/mainview/CollaboratorPointers.d.ts +1 -1
- package/lib/mainview/CollaboratorPointers.js +5 -5
- package/lib/mainview/FollowIndicator.d.ts +2 -2
- package/lib/mainview/FollowIndicator.js +3 -3
- package/lib/mainview/TemporalSlider.d.ts +1 -1
- package/lib/mainview/TemporalSlider.js +7 -7
- package/lib/mainview/mainView.d.ts +4 -2
- package/lib/mainview/mainView.js +232 -137
- package/lib/menus.d.ts +1 -1
- package/lib/menus.js +7 -7
- package/lib/panelview/annotationPanel.d.ts +2 -2
- package/lib/panelview/annotationPanel.js +1 -1
- package/lib/panelview/components/filter-panel/Filter.d.ts +2 -2
- package/lib/panelview/components/filter-panel/Filter.js +5 -5
- package/lib/panelview/components/filter-panel/FilterRow.d.ts +2 -2
- package/lib/panelview/components/identify-panel/IdentifyPanel.d.ts +1 -1
- package/lib/panelview/components/identify-panel/IdentifyPanel.js +5 -5
- package/lib/panelview/components/layers.d.ts +1 -1
- package/lib/panelview/components/layers.js +12 -12
- package/lib/panelview/leftpanel.d.ts +4 -2
- package/lib/panelview/leftpanel.js +24 -6
- package/lib/panelview/model.d.ts +1 -1
- package/lib/panelview/objectproperties.d.ts +1 -1
- package/lib/panelview/objectproperties.js +3 -3
- package/lib/panelview/rightpanel.d.ts +2 -1
- package/lib/panelview/rightpanel.js +13 -5
- package/lib/{processing.d.ts → processing/index.d.ts} +4 -4
- package/lib/{processing.js → processing/index.js} +19 -24
- package/lib/processing/processingCommands.d.ts +6 -0
- package/lib/processing/processingCommands.js +47 -0
- package/lib/processing/processingFormToParam.d.ts +2 -0
- package/lib/processing/processingFormToParam.js +15 -0
- package/lib/shared/components/Badge.d.ts +7 -0
- package/lib/shared/components/Badge.js +19 -0
- package/lib/shared/components/Button.d.ts +9 -0
- package/lib/shared/components/Button.js +20 -0
- package/lib/shared/components/Calendar.d.ts +47 -0
- package/lib/shared/components/Calendar.js +184 -0
- package/lib/shared/components/Checkbox.d.ts +4 -0
- package/lib/shared/components/Checkbox.js +25 -0
- package/lib/shared/components/DropdownMenu.d.ts +27 -0
- package/lib/shared/components/DropdownMenu.js +92 -0
- package/lib/shared/components/Pagination.d.ts +25 -0
- package/lib/shared/components/Pagination.js +68 -0
- package/lib/shared/components/Popover.d.ts +7 -0
- package/lib/shared/components/Popover.js +32 -0
- package/lib/shared/components/Tabs.d.ts +7 -0
- package/lib/shared/components/Tabs.js +31 -0
- package/lib/shared/components/ToggleGroup.d.ts +12 -0
- package/lib/shared/components/ToggleGroup.js +52 -0
- package/lib/shared/components/loading.d.ts +12 -0
- package/lib/shared/components/loading.js +6 -0
- package/lib/shared/components/utils.d.ts +2 -0
- package/lib/shared/components/utils.js +4 -0
- package/lib/shared/hooks/useIsFirstRender.d.ts +2 -0
- package/lib/shared/hooks/useIsFirstRender.js +10 -0
- package/lib/stacBrowser/StacBrowser.d.ts +7 -0
- package/lib/stacBrowser/StacBrowser.js +16 -0
- package/lib/stacBrowser/StacPanel.d.ts +14 -0
- package/lib/stacBrowser/StacPanel.js +16 -0
- package/lib/stacBrowser/components/StacFilterSection.d.ts +23 -0
- package/lib/stacBrowser/components/StacFilterSection.js +49 -0
- package/lib/stacBrowser/components/StacPanelFilters.d.ts +14 -0
- package/lib/stacBrowser/components/StacPanelFilters.js +65 -0
- package/lib/stacBrowser/components/StacPanelResults.d.ts +13 -0
- package/lib/stacBrowser/components/StacPanelResults.js +48 -0
- package/lib/stacBrowser/components/StacPanelView.d.ts +7 -0
- package/lib/stacBrowser/components/StacPanelView.js +20 -0
- package/lib/stacBrowser/constants.d.ts +25 -0
- package/lib/stacBrowser/constants.js +197 -0
- package/lib/stacBrowser/hooks/useStacSearch.d.ts +30 -0
- package/lib/stacBrowser/hooks/useStacSearch.js +221 -0
- package/lib/stacBrowser/index.d.ts +1 -0
- package/lib/stacBrowser/index.js +1 -0
- package/lib/stacBrowser/types/types.d.ts +124 -0
- package/lib/stacBrowser/types/types.js +1 -0
- package/lib/statusbar/StatusBar.d.ts +1 -1
- package/lib/statusbar/StatusBar.js +3 -3
- package/lib/toolbar/index.d.ts +0 -1
- package/lib/toolbar/index.js +0 -1
- package/lib/toolbar/widget.js +15 -15
- package/lib/tools.d.ts +29 -4
- package/lib/tools.js +74 -69
- package/lib/types.d.ts +2 -0
- package/lib/widget.d.ts +1 -1
- package/lib/widget.js +5 -5
- package/package.json +22 -8
- package/style/base.css +26 -0
- package/style/layerBrowser.css +10 -0
- package/style/shared/badge.css +61 -0
- package/style/shared/button.css +164 -0
- package/style/shared/calendar.css +274 -0
- package/style/shared/checkbox.css +28 -0
- package/style/shared/dropdownMenu.css +240 -0
- package/style/shared/pagination.css +167 -0
- package/style/shared/popover.css +53 -0
- package/style/shared/tabs.css +57 -0
- package/style/shared/toggle.css +85 -0
- package/style/stacBrowser.css +74 -0
- package/style/symbologyDialog.css +0 -7
- package/lib/mainview/spinner.d.ts +0 -6
- package/lib/mainview/spinner.js +0 -5
- package/lib/toolbar/usertoolbaritem.d.ts +0 -19
- package/lib/toolbar/usertoolbaritem.js +0 -59
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
declare const Categorized:
|
|
2
|
+
import { ISymbologyTabbedDialogWithAttributesProps } from "../../symbologyDialog";
|
|
3
|
+
declare const Categorized: React.FC<ISymbologyTabbedDialogWithAttributesProps>;
|
|
4
4
|
export default Categorized;
|
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
import React, { useEffect, useRef, useState } from 'react';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const Categorized = ({ model, state, okSignalPromise, cancel, layerId }) => {
|
|
9
|
-
const selectedValueRef = useRef();
|
|
2
|
+
import ColorRamp from "../../components/color_ramp/ColorRamp";
|
|
3
|
+
import StopContainer from "../../components/color_stops/StopContainer";
|
|
4
|
+
import { Utils, VectorUtils } from "../../symbologyUtils";
|
|
5
|
+
import ValueSelect from "../components/ValueSelect";
|
|
6
|
+
const Categorized = ({ model, state, okSignalPromise, cancel, layerId, symbologyTab, selectableAttributesAndValues, }) => {
|
|
7
|
+
const selectedAttributeRef = useRef();
|
|
10
8
|
const stopRowsRef = useRef();
|
|
11
9
|
const colorRampOptionsRef = useRef();
|
|
12
|
-
const [
|
|
10
|
+
const [selectedAttribute, setSelectedAttribute] = useState('');
|
|
13
11
|
const [stopRows, setStopRows] = useState([]);
|
|
14
12
|
const [colorRampOptions, setColorRampOptions] = useState();
|
|
15
|
-
const [
|
|
13
|
+
const [manualStyle, setManualStyle] = useState({
|
|
14
|
+
fillColor: '#3399CC',
|
|
15
|
+
strokeColor: '#3399CC',
|
|
16
|
+
strokeWidth: 1.25,
|
|
17
|
+
radius: 5,
|
|
18
|
+
});
|
|
19
|
+
const manualStyleRef = useRef(manualStyle);
|
|
16
20
|
if (!layerId) {
|
|
17
21
|
return;
|
|
18
22
|
}
|
|
@@ -20,10 +24,6 @@ const Categorized = ({ model, state, okSignalPromise, cancel, layerId }) => {
|
|
|
20
24
|
if (!(layer === null || layer === void 0 ? void 0 : layer.parameters)) {
|
|
21
25
|
return;
|
|
22
26
|
}
|
|
23
|
-
const { featureProperties } = useGetProperties({
|
|
24
|
-
layerId,
|
|
25
|
-
model: model
|
|
26
|
-
});
|
|
27
27
|
useEffect(() => {
|
|
28
28
|
const valueColorPairs = VectorUtils.buildColorInfo(layer);
|
|
29
29
|
setStopRows(valueColorPairs);
|
|
@@ -36,70 +36,165 @@ const Categorized = ({ model, state, okSignalPromise, cancel, layerId }) => {
|
|
|
36
36
|
});
|
|
37
37
|
};
|
|
38
38
|
}, []);
|
|
39
|
+
useEffect(() => {
|
|
40
|
+
var _a;
|
|
41
|
+
if ((_a = layer === null || layer === void 0 ? void 0 : layer.parameters) === null || _a === void 0 ? void 0 : _a.color) {
|
|
42
|
+
const fillColor = layer.parameters.color['fill-color'];
|
|
43
|
+
const circleFillColor = layer.parameters.color['circle-fill-color'];
|
|
44
|
+
const strokeColor = layer.parameters.color['stroke-color'];
|
|
45
|
+
const circleStrokeColor = layer.parameters.color['circle-stroke-color'];
|
|
46
|
+
const isSimpleColor = (val) => typeof val === 'string' && /^#?[0-9A-Fa-f]{3,8}$/.test(val);
|
|
47
|
+
setManualStyle({
|
|
48
|
+
fillColor: isSimpleColor(fillColor)
|
|
49
|
+
? fillColor
|
|
50
|
+
: isSimpleColor(circleFillColor)
|
|
51
|
+
? circleFillColor
|
|
52
|
+
: '#3399CC',
|
|
53
|
+
strokeColor: isSimpleColor(strokeColor)
|
|
54
|
+
? strokeColor
|
|
55
|
+
: isSimpleColor(circleStrokeColor)
|
|
56
|
+
? circleStrokeColor
|
|
57
|
+
: '#3399CC',
|
|
58
|
+
strokeWidth: layer.parameters.color['stroke-width'] ||
|
|
59
|
+
layer.parameters.color['circle-stroke-width'] ||
|
|
60
|
+
1.25,
|
|
61
|
+
radius: layer.parameters.color['circle-radius'] || 5,
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
}, [layerId]);
|
|
65
|
+
useEffect(() => {
|
|
66
|
+
manualStyleRef.current = manualStyle;
|
|
67
|
+
}, [manualStyle]);
|
|
39
68
|
useEffect(() => {
|
|
40
69
|
var _a, _b;
|
|
41
70
|
// We only want number values here
|
|
42
|
-
const numericFeatures = getNumericFeatureAttributes(featureProperties);
|
|
43
|
-
setFeatures(numericFeatures);
|
|
44
71
|
const layerParams = layer.parameters;
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
}, [
|
|
72
|
+
const attribute = (_b = (_a = layerParams.symbologyState) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : Object.keys(selectableAttributesAndValues)[0];
|
|
73
|
+
setSelectedAttribute(attribute);
|
|
74
|
+
}, [selectableAttributesAndValues]);
|
|
48
75
|
useEffect(() => {
|
|
49
|
-
|
|
76
|
+
selectedAttributeRef.current = selectedAttribute;
|
|
50
77
|
stopRowsRef.current = stopRows;
|
|
51
78
|
colorRampOptionsRef.current = colorRampOptions;
|
|
52
|
-
}, [
|
|
79
|
+
}, [selectedAttribute, stopRows, colorRampOptions]);
|
|
53
80
|
const buildColorInfoFromClassification = (selectedMode, numberOfShades, selectedRamp, setIsLoading) => {
|
|
54
81
|
setColorRampOptions({
|
|
55
82
|
selectedFunction: '',
|
|
56
83
|
selectedRamp,
|
|
57
84
|
numberOfShades: '',
|
|
58
|
-
selectedMode: ''
|
|
85
|
+
selectedMode: '',
|
|
59
86
|
});
|
|
60
|
-
const stops = Array.from(
|
|
87
|
+
const stops = Array.from(selectableAttributesAndValues[selectedAttribute]).sort((a, b) => a - b);
|
|
61
88
|
const valueColorPairs = Utils.getValueColorPairs(stops, selectedRamp, stops.length);
|
|
62
89
|
setStopRows(valueColorPairs);
|
|
63
90
|
};
|
|
64
91
|
const handleOk = () => {
|
|
65
|
-
var _a, _b, _c
|
|
92
|
+
var _a, _b, _c;
|
|
66
93
|
if (!layer.parameters) {
|
|
67
94
|
return;
|
|
68
95
|
}
|
|
69
|
-
const colorExpr = [];
|
|
70
|
-
colorExpr.push('case');
|
|
71
|
-
(_a = stopRowsRef.current) === null || _a === void 0 ? void 0 : _a.map(stop => {
|
|
72
|
-
colorExpr.push(['==', ['get', selectedValueRef.current], stop.stop]);
|
|
73
|
-
colorExpr.push(stop.output);
|
|
74
|
-
});
|
|
75
|
-
// fallback value
|
|
76
|
-
colorExpr.push([0, 0, 0, 0.0]);
|
|
77
96
|
const newStyle = Object.assign({}, layer.parameters.color);
|
|
78
|
-
if (
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
97
|
+
if (stopRowsRef.current && stopRowsRef.current.length > 0) {
|
|
98
|
+
// Classification applied (for color)
|
|
99
|
+
const expr = ['case'];
|
|
100
|
+
stopRowsRef.current.forEach(stop => {
|
|
101
|
+
expr.push(['==', ['get', selectedAttributeRef.current], stop.stop]);
|
|
102
|
+
expr.push(stop.output);
|
|
103
|
+
});
|
|
104
|
+
if (symbologyTab === 'color') {
|
|
105
|
+
expr.push([0, 0, 0, 0.0]); // fallback color
|
|
106
|
+
newStyle['fill-color'] = expr;
|
|
107
|
+
newStyle['circle-fill-color'] = expr;
|
|
108
|
+
newStyle['stroke-color'] = expr;
|
|
109
|
+
newStyle['circle-stroke-color'] = expr;
|
|
110
|
+
}
|
|
83
111
|
}
|
|
84
|
-
|
|
85
|
-
newStyle['
|
|
112
|
+
else {
|
|
113
|
+
newStyle['fill-color'] = manualStyleRef.current.fillColor;
|
|
114
|
+
newStyle['circle-fill-color'] = manualStyleRef.current.fillColor;
|
|
86
115
|
}
|
|
116
|
+
newStyle['stroke-width'] = manualStyleRef.current.strokeWidth;
|
|
117
|
+
newStyle['circle-stroke-width'] = manualStyleRef.current.strokeWidth;
|
|
118
|
+
newStyle['circle-radius'] = manualStyleRef.current.radius;
|
|
119
|
+
newStyle['circle-stroke-color'] = manualStyleRef.current.strokeColor;
|
|
87
120
|
const symbologyState = {
|
|
88
121
|
renderType: 'Categorized',
|
|
89
|
-
value:
|
|
90
|
-
colorRamp: (
|
|
91
|
-
nClasses: (
|
|
92
|
-
mode: (
|
|
122
|
+
value: selectedAttributeRef.current,
|
|
123
|
+
colorRamp: (_a = colorRampOptionsRef.current) === null || _a === void 0 ? void 0 : _a.selectedRamp,
|
|
124
|
+
nClasses: (_b = colorRampOptionsRef.current) === null || _b === void 0 ? void 0 : _b.numberOfShades,
|
|
125
|
+
mode: (_c = colorRampOptionsRef.current) === null || _c === void 0 ? void 0 : _c.selectedMode,
|
|
126
|
+
symbologyTab,
|
|
93
127
|
};
|
|
94
128
|
layer.parameters.symbologyState = symbologyState;
|
|
95
129
|
layer.parameters.color = newStyle;
|
|
96
|
-
layer.type
|
|
130
|
+
if (layer.type === 'HeatmapLayer') {
|
|
131
|
+
layer.type = 'VectorLayer';
|
|
132
|
+
}
|
|
97
133
|
model.sharedModel.updateLayer(layerId, layer);
|
|
98
134
|
cancel();
|
|
99
135
|
};
|
|
136
|
+
const handleReset = (method) => {
|
|
137
|
+
if (!(layer === null || layer === void 0 ? void 0 : layer.parameters)) {
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
const newStyle = Object.assign({}, layer.parameters.color);
|
|
141
|
+
if (method === 'color') {
|
|
142
|
+
console.log('delecol');
|
|
143
|
+
delete newStyle['fill-color'];
|
|
144
|
+
delete newStyle['stroke-color'];
|
|
145
|
+
delete newStyle['circle-fill-color'];
|
|
146
|
+
delete newStyle['circle-stroke-color'];
|
|
147
|
+
setStopRows([]);
|
|
148
|
+
// Reset color classification options
|
|
149
|
+
if (layer.parameters.symbologyState) {
|
|
150
|
+
layer.parameters.symbologyState.colorRamp = undefined;
|
|
151
|
+
layer.parameters.symbologyState.nClasses = undefined;
|
|
152
|
+
layer.parameters.symbologyState.mode = undefined;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
if (method === 'radius') {
|
|
156
|
+
delete newStyle['circle-radius'];
|
|
157
|
+
}
|
|
158
|
+
layer.parameters.color = newStyle;
|
|
159
|
+
model.sharedModel.updateLayer(layerId, layer);
|
|
160
|
+
};
|
|
161
|
+
const body = (() => {
|
|
162
|
+
if (Object.keys(selectableAttributesAndValues).length === 0) {
|
|
163
|
+
return (React.createElement("p", { className: "errors" }, "This symbology type is not available; no attributes contain numeric values."));
|
|
164
|
+
}
|
|
165
|
+
else {
|
|
166
|
+
return (React.createElement(React.Fragment, null,
|
|
167
|
+
React.createElement(ValueSelect, { featureProperties: selectableAttributesAndValues, selectedValue: selectedAttribute, setSelectedValue: setSelectedAttribute }),
|
|
168
|
+
React.createElement("div", { className: "jp-gis-layer-symbology-container" },
|
|
169
|
+
symbologyTab === 'color' && (React.createElement(React.Fragment, null,
|
|
170
|
+
React.createElement("div", { className: "jp-gis-symbology-row" },
|
|
171
|
+
React.createElement("label", null, "Fill Color:"),
|
|
172
|
+
React.createElement("input", { type: "color", className: "jp-mod-styled", value: manualStyle.fillColor, onChange: e => {
|
|
173
|
+
handleReset('color');
|
|
174
|
+
setManualStyle(prev => (Object.assign(Object.assign({}, prev), { fillColor: e.target.value })));
|
|
175
|
+
} })),
|
|
176
|
+
React.createElement("div", { className: "jp-gis-symbology-row" },
|
|
177
|
+
React.createElement("label", null, "Stroke Color:"),
|
|
178
|
+
React.createElement("input", { type: "color", className: "jp-mod-styled", value: manualStyle.strokeColor, onChange: e => {
|
|
179
|
+
setManualStyle(prev => (Object.assign(Object.assign({}, prev), { strokeColor: e.target.value })));
|
|
180
|
+
} })),
|
|
181
|
+
React.createElement("div", { className: "jp-gis-symbology-row" },
|
|
182
|
+
React.createElement("label", null, "Stroke Width:"),
|
|
183
|
+
React.createElement("input", { type: "number", className: "jp-mod-styled", value: manualStyle.strokeWidth, onChange: e => {
|
|
184
|
+
setManualStyle(prev => (Object.assign(Object.assign({}, prev), { strokeWidth: +e.target.value })));
|
|
185
|
+
} })))),
|
|
186
|
+
symbologyTab === 'radius' && (React.createElement("div", { className: "jp-gis-symbology-row" },
|
|
187
|
+
React.createElement("label", null, "Circle Radius:"),
|
|
188
|
+
React.createElement("input", { type: "number", className: "jp-mod-styled", value: manualStyle.radius, onChange: e => {
|
|
189
|
+
setManualStyle(prev => (Object.assign(Object.assign({}, prev), { radius: +e.target.value })));
|
|
190
|
+
} })))),
|
|
191
|
+
React.createElement("div", { className: "jp-gis-layer-symbology-container" },
|
|
192
|
+
React.createElement(ColorRamp, { layerParams: layer.parameters, modeOptions: [], classifyFunc: buildColorInfoFromClassification, showModeRow: false, showRampSelector: symbologyTab === 'color' }),
|
|
193
|
+
React.createElement(StopContainer, { selectedMethod: '', stopRows: stopRows, setStopRows: setStopRows }))));
|
|
194
|
+
}
|
|
195
|
+
})();
|
|
100
196
|
return (React.createElement("div", { className: "jp-gis-layer-symbology-container" },
|
|
101
|
-
React.createElement(
|
|
102
|
-
|
|
103
|
-
React.createElement(StopContainer, { selectedMethod: '', stopRows: stopRows, setStopRows: setStopRows })));
|
|
197
|
+
React.createElement("p", null, "Color features based on an attribute containing unique values."),
|
|
198
|
+
body));
|
|
104
199
|
};
|
|
105
200
|
export default Categorized;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
declare const Graduated:
|
|
2
|
+
import { ISymbologyTabbedDialogWithAttributesProps } from "../../symbologyDialog";
|
|
3
|
+
declare const Graduated: React.FC<ISymbologyTabbedDialogWithAttributesProps>;
|
|
4
4
|
export default Graduated;
|
|
@@ -1,29 +1,36 @@
|
|
|
1
1
|
import React, { useEffect, useRef, useState } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
import ValueSelect from '../components/ValueSelect';
|
|
9
|
-
const Graduated = ({ model, state, okSignalPromise, cancel, layerId }) => {
|
|
2
|
+
import { VectorClassifications } from "../../classificationModes";
|
|
3
|
+
import ColorRamp from "../../components/color_ramp/ColorRamp";
|
|
4
|
+
import StopContainer from "../../components/color_stops/StopContainer";
|
|
5
|
+
import { Utils, VectorUtils } from "../../symbologyUtils";
|
|
6
|
+
import ValueSelect from "../components/ValueSelect";
|
|
7
|
+
const Graduated = ({ model, state, okSignalPromise, cancel, layerId, symbologyTab, selectableAttributesAndValues, }) => {
|
|
10
8
|
const modeOptions = [
|
|
11
9
|
'quantile',
|
|
12
10
|
'equal interval',
|
|
13
11
|
'jenks',
|
|
14
12
|
'pretty',
|
|
15
|
-
'logarithmic'
|
|
13
|
+
'logarithmic',
|
|
16
14
|
];
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
const
|
|
15
|
+
const selectableAttributeRef = useRef();
|
|
16
|
+
const symbologyTabRef = useRef();
|
|
17
|
+
const colorStopRowsRef = useRef([]);
|
|
18
|
+
const radiusStopRowsRef = useRef([]);
|
|
20
19
|
const colorRampOptionsRef = useRef();
|
|
21
|
-
const [
|
|
22
|
-
const [
|
|
23
|
-
const [
|
|
24
|
-
const [methodOptions, setMethodOptions] = useState(['color']);
|
|
25
|
-
const [features, setFeatures] = useState({});
|
|
20
|
+
const [selectedAttribute, setSelectedAttribute] = useState('');
|
|
21
|
+
const [colorStopRows, setColorStopRows] = useState([]);
|
|
22
|
+
const [radiusStopRows, setRadiusStopRows] = useState([]);
|
|
26
23
|
const [colorRampOptions, setColorRampOptions] = useState();
|
|
24
|
+
const [colorManualStyle, setColorManualStyle] = useState({
|
|
25
|
+
fillColor: '#3399CC',
|
|
26
|
+
strokeColor: '#3399CC',
|
|
27
|
+
strokeWidth: 1.25,
|
|
28
|
+
});
|
|
29
|
+
const [radiusManualStyle, setRadiusManualStyle] = useState({
|
|
30
|
+
radius: 5,
|
|
31
|
+
});
|
|
32
|
+
const colorManualStyleRef = useRef(colorManualStyle);
|
|
33
|
+
const radiusManualStyleRef = useRef(radiusManualStyle);
|
|
27
34
|
if (!layerId) {
|
|
28
35
|
return;
|
|
29
36
|
}
|
|
@@ -31,22 +38,8 @@ const Graduated = ({ model, state, okSignalPromise, cancel, layerId }) => {
|
|
|
31
38
|
if (!(layer === null || layer === void 0 ? void 0 : layer.parameters)) {
|
|
32
39
|
return;
|
|
33
40
|
}
|
|
34
|
-
const { featureProperties } = useGetProperties({
|
|
35
|
-
layerId,
|
|
36
|
-
model: model
|
|
37
|
-
});
|
|
38
41
|
useEffect(() => {
|
|
39
|
-
|
|
40
|
-
let stopOutputPairs = [];
|
|
41
|
-
const layerParams = layer.parameters;
|
|
42
|
-
const method = (_b = (_a = layerParams.symbologyState) === null || _a === void 0 ? void 0 : _a.method) !== null && _b !== void 0 ? _b : 'color';
|
|
43
|
-
if (method === 'color') {
|
|
44
|
-
stopOutputPairs = VectorUtils.buildColorInfo(layer);
|
|
45
|
-
}
|
|
46
|
-
if (method === 'radius') {
|
|
47
|
-
stopOutputPairs = VectorUtils.buildRadiusInfo(layer);
|
|
48
|
-
}
|
|
49
|
-
setStopRows(stopOutputPairs);
|
|
42
|
+
updateStopRowsBasedOnLayer();
|
|
50
43
|
okSignalPromise.promise.then(okSignal => {
|
|
51
44
|
okSignal.connect(handleOk, this);
|
|
52
45
|
});
|
|
@@ -57,68 +50,119 @@ const Graduated = ({ model, state, okSignalPromise, cancel, layerId }) => {
|
|
|
57
50
|
};
|
|
58
51
|
}, []);
|
|
59
52
|
useEffect(() => {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
53
|
+
var _a;
|
|
54
|
+
if ((_a = layer === null || layer === void 0 ? void 0 : layer.parameters) === null || _a === void 0 ? void 0 : _a.color) {
|
|
55
|
+
const fillColor = layer.parameters.color['fill-color'];
|
|
56
|
+
const circleFillColor = layer.parameters.color['circle-fill-color'];
|
|
57
|
+
const strokeColor = layer.parameters.color['stroke-color'];
|
|
58
|
+
const circleStrokeColor = layer.parameters.color['circle-stroke-color'];
|
|
59
|
+
const isSimpleColor = (val) => typeof val === 'string' && /^#?[0-9A-Fa-f]{3,8}$/.test(val);
|
|
60
|
+
setColorManualStyle({
|
|
61
|
+
fillColor: isSimpleColor(fillColor)
|
|
62
|
+
? fillColor
|
|
63
|
+
: isSimpleColor(circleFillColor)
|
|
64
|
+
? circleFillColor
|
|
65
|
+
: '#3399CC',
|
|
66
|
+
strokeColor: isSimpleColor(strokeColor)
|
|
67
|
+
? strokeColor
|
|
68
|
+
: isSimpleColor(circleStrokeColor)
|
|
69
|
+
? circleStrokeColor
|
|
70
|
+
: '#3399CC',
|
|
71
|
+
strokeWidth: layer.parameters.color['stroke-width'] ||
|
|
72
|
+
layer.parameters.color['circle-stroke-width'] ||
|
|
73
|
+
1.25,
|
|
74
|
+
});
|
|
75
|
+
setRadiusManualStyle({
|
|
76
|
+
radius: layer.parameters.color['circle-radius'] || 5,
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
}, [layerId]);
|
|
80
|
+
useEffect(() => {
|
|
81
|
+
colorStopRowsRef.current = colorStopRows;
|
|
82
|
+
radiusStopRowsRef.current = radiusStopRows;
|
|
83
|
+
selectableAttributeRef.current = selectedAttribute;
|
|
84
|
+
symbologyTabRef.current = symbologyTab;
|
|
63
85
|
colorRampOptionsRef.current = colorRampOptions;
|
|
64
|
-
}, [
|
|
86
|
+
}, [
|
|
87
|
+
colorStopRows,
|
|
88
|
+
radiusStopRows,
|
|
89
|
+
selectedAttribute,
|
|
90
|
+
symbologyTab,
|
|
91
|
+
colorRampOptions,
|
|
92
|
+
]);
|
|
93
|
+
useEffect(() => {
|
|
94
|
+
colorManualStyleRef.current = colorManualStyle;
|
|
95
|
+
radiusManualStyleRef.current = radiusManualStyle;
|
|
96
|
+
}, [colorManualStyle, radiusManualStyle]);
|
|
65
97
|
useEffect(() => {
|
|
66
|
-
var _a, _b
|
|
67
|
-
// Set up method options
|
|
68
|
-
if (((_a = layer === null || layer === void 0 ? void 0 : layer.parameters) === null || _a === void 0 ? void 0 : _a.type) === 'circle') {
|
|
69
|
-
const options = ['color', 'radius'];
|
|
70
|
-
setMethodOptions(options);
|
|
71
|
-
}
|
|
72
|
-
// We only want number values here
|
|
73
|
-
const numericFeatures = getNumericFeatureAttributes(featureProperties);
|
|
74
|
-
setFeatures(numericFeatures);
|
|
98
|
+
var _a, _b;
|
|
75
99
|
const layerParams = layer.parameters;
|
|
76
|
-
const
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
100
|
+
const attribute = (_b = (_a = layerParams.symbologyState) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : Object.keys(selectableAttributesAndValues)[0];
|
|
101
|
+
setSelectedAttribute(attribute);
|
|
102
|
+
}, [selectableAttributesAndValues]);
|
|
103
|
+
const updateStopRowsBasedOnLayer = () => {
|
|
104
|
+
if (!layer) {
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
setColorStopRows(VectorUtils.buildColorInfo(layer));
|
|
108
|
+
setRadiusStopRows(VectorUtils.buildRadiusInfo(layer));
|
|
109
|
+
};
|
|
81
110
|
const handleOk = () => {
|
|
82
|
-
var _a, _b, _c
|
|
111
|
+
var _a, _b, _c;
|
|
83
112
|
if (!layer.parameters) {
|
|
84
113
|
return;
|
|
85
114
|
}
|
|
86
|
-
const colorExpr = [];
|
|
87
|
-
colorExpr.push('interpolate');
|
|
88
|
-
colorExpr.push(['linear']);
|
|
89
|
-
colorExpr.push(['get', selectedValueRef.current]);
|
|
90
|
-
(_a = stopRowsRef.current) === null || _a === void 0 ? void 0 : _a.map(stop => {
|
|
91
|
-
colorExpr.push(stop.stop);
|
|
92
|
-
colorExpr.push(stop.output);
|
|
93
|
-
});
|
|
94
115
|
const newStyle = Object.assign({}, layer.parameters.color);
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
116
|
+
// Apply color symbology
|
|
117
|
+
if (colorStopRowsRef.current.length > 0) {
|
|
118
|
+
const colorExpr = [
|
|
119
|
+
'interpolate',
|
|
120
|
+
['linear'],
|
|
121
|
+
['get', selectableAttributeRef.current],
|
|
122
|
+
];
|
|
123
|
+
colorStopRowsRef.current.forEach(stop => {
|
|
124
|
+
colorExpr.push(stop.stop);
|
|
125
|
+
colorExpr.push(stop.output);
|
|
126
|
+
});
|
|
127
|
+
newStyle['fill-color'] = colorExpr;
|
|
128
|
+
newStyle['circle-fill-color'] = colorExpr;
|
|
129
|
+
}
|
|
130
|
+
else {
|
|
131
|
+
newStyle['fill-color'] = undefined;
|
|
132
|
+
newStyle['circle-fill-color'] = undefined;
|
|
133
|
+
}
|
|
134
|
+
newStyle['stroke-color'] = colorManualStyleRef.current.strokeColor;
|
|
135
|
+
newStyle['circle-stroke-color'] = colorManualStyleRef.current.strokeColor;
|
|
136
|
+
newStyle['stroke-width'] = colorManualStyleRef.current.strokeWidth;
|
|
137
|
+
newStyle['circle-stroke-width'] = colorManualStyleRef.current.strokeWidth;
|
|
138
|
+
// Apply radius symbology
|
|
139
|
+
if (radiusStopRowsRef.current.length > 0) {
|
|
140
|
+
const radiusExpr = [
|
|
141
|
+
'interpolate',
|
|
142
|
+
['linear'],
|
|
143
|
+
['get', selectableAttributeRef.current],
|
|
144
|
+
];
|
|
145
|
+
radiusStopRowsRef.current.forEach(stop => {
|
|
146
|
+
radiusExpr.push(stop.stop);
|
|
147
|
+
radiusExpr.push(stop.output);
|
|
148
|
+
});
|
|
149
|
+
newStyle['circle-radius'] = radiusExpr;
|
|
150
|
+
}
|
|
151
|
+
else {
|
|
152
|
+
newStyle['circle-radius'] = radiusManualStyleRef.current.radius;
|
|
153
|
+
}
|
|
154
|
+
layer.parameters.color = newStyle;
|
|
155
|
+
layer.parameters.symbologyState = {
|
|
112
156
|
renderType: 'Graduated',
|
|
113
|
-
value:
|
|
114
|
-
method:
|
|
115
|
-
colorRamp: (
|
|
116
|
-
nClasses: (
|
|
117
|
-
mode: (
|
|
157
|
+
value: selectableAttributeRef.current,
|
|
158
|
+
method: symbologyTabRef.current,
|
|
159
|
+
colorRamp: (_a = colorRampOptionsRef.current) === null || _a === void 0 ? void 0 : _a.selectedRamp,
|
|
160
|
+
nClasses: (_b = colorRampOptionsRef.current) === null || _b === void 0 ? void 0 : _b.numberOfShades,
|
|
161
|
+
mode: (_c = colorRampOptionsRef.current) === null || _c === void 0 ? void 0 : _c.selectedMode,
|
|
118
162
|
};
|
|
119
|
-
layer.
|
|
120
|
-
|
|
121
|
-
|
|
163
|
+
if (layer.type === 'HeatmapLayer') {
|
|
164
|
+
layer.type = 'VectorLayer';
|
|
165
|
+
}
|
|
122
166
|
model.sharedModel.updateLayer(layerId, layer);
|
|
123
167
|
cancel();
|
|
124
168
|
};
|
|
@@ -126,10 +170,10 @@ const Graduated = ({ model, state, okSignalPromise, cancel, layerId }) => {
|
|
|
126
170
|
setColorRampOptions({
|
|
127
171
|
selectedRamp,
|
|
128
172
|
numberOfShades,
|
|
129
|
-
selectedMode
|
|
173
|
+
selectedMode,
|
|
130
174
|
});
|
|
131
175
|
let stops;
|
|
132
|
-
const values = Array.from(
|
|
176
|
+
const values = Array.from(selectableAttributesAndValues[selectedAttribute]);
|
|
133
177
|
switch (selectedMode) {
|
|
134
178
|
case 'quantile':
|
|
135
179
|
stops = VectorClassifications.calculateQuantileBreaks(values, +numberOfShades);
|
|
@@ -150,23 +194,73 @@ const Graduated = ({ model, state, okSignalPromise, cancel, layerId }) => {
|
|
|
150
194
|
console.warn('No mode selected');
|
|
151
195
|
return;
|
|
152
196
|
}
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
197
|
+
const stopOutputPairs = symbologyTab === 'radius'
|
|
198
|
+
? stops.map(v => ({ stop: v, output: v }))
|
|
199
|
+
: Utils.getValueColorPairs(stops, selectedRamp, +numberOfShades);
|
|
200
|
+
if (symbologyTab === 'radius') {
|
|
201
|
+
setRadiusStopRows(stopOutputPairs);
|
|
158
202
|
}
|
|
159
203
|
else {
|
|
160
|
-
stopOutputPairs
|
|
204
|
+
setColorStopRows(stopOutputPairs);
|
|
161
205
|
}
|
|
162
|
-
setStopRows(stopOutputPairs);
|
|
163
206
|
};
|
|
207
|
+
const handleReset = (method) => {
|
|
208
|
+
if (!(layer === null || layer === void 0 ? void 0 : layer.parameters)) {
|
|
209
|
+
return;
|
|
210
|
+
}
|
|
211
|
+
const newStyle = Object.assign({}, layer.parameters.color);
|
|
212
|
+
if (method === 'color') {
|
|
213
|
+
delete newStyle['fill-color'];
|
|
214
|
+
delete newStyle['stroke-color'];
|
|
215
|
+
delete newStyle['circle-fill-color'];
|
|
216
|
+
setColorStopRows([]);
|
|
217
|
+
setColorRampOptions(undefined);
|
|
218
|
+
}
|
|
219
|
+
if (method === 'radius') {
|
|
220
|
+
delete newStyle['circle-radius'];
|
|
221
|
+
setRadiusStopRows([]);
|
|
222
|
+
}
|
|
223
|
+
layer.parameters.color = newStyle;
|
|
224
|
+
model.sharedModel.updateLayer(layerId, layer);
|
|
225
|
+
};
|
|
226
|
+
const body = (() => {
|
|
227
|
+
var _a;
|
|
228
|
+
if (((_a = Object.keys(selectableAttributesAndValues)) === null || _a === void 0 ? void 0 : _a.length) === 0) {
|
|
229
|
+
return (React.createElement("p", { className: "errors" }, "This symbology type is not available; no attributes contain numeric values."));
|
|
230
|
+
}
|
|
231
|
+
else {
|
|
232
|
+
return (React.createElement(React.Fragment, null,
|
|
233
|
+
React.createElement(ValueSelect, { featureProperties: selectableAttributesAndValues, selectedValue: selectedAttribute, setSelectedValue: setSelectedAttribute }),
|
|
234
|
+
React.createElement("div", { className: "jp-gis-layer-symbology-container" },
|
|
235
|
+
symbologyTab === 'color' && (React.createElement(React.Fragment, null,
|
|
236
|
+
React.createElement("div", { className: "jp-gis-symbology-row" },
|
|
237
|
+
React.createElement("label", null, "Fill Color:"),
|
|
238
|
+
React.createElement("input", { type: "color", className: "jp-mod-styled", value: colorManualStyle.fillColor, onChange: e => {
|
|
239
|
+
handleReset('color');
|
|
240
|
+
setColorManualStyle(Object.assign(Object.assign({}, colorManualStyle), { fillColor: e.target.value }));
|
|
241
|
+
} })),
|
|
242
|
+
React.createElement("div", { className: "jp-gis-symbology-row" },
|
|
243
|
+
React.createElement("label", null, "Stroke Color:"),
|
|
244
|
+
React.createElement("input", { type: "color", className: "jp-mod-styled", value: colorManualStyle.strokeColor, onChange: e => {
|
|
245
|
+
setColorManualStyle(Object.assign(Object.assign({}, colorManualStyle), { strokeColor: e.target.value }));
|
|
246
|
+
} })),
|
|
247
|
+
React.createElement("div", { className: "jp-gis-symbology-row" },
|
|
248
|
+
React.createElement("label", null, "Stroke Width:"),
|
|
249
|
+
React.createElement("input", { type: "number", className: "jp-mod-styled", value: colorManualStyle.strokeWidth, onChange: e => {
|
|
250
|
+
setColorManualStyle(Object.assign(Object.assign({}, colorManualStyle), { strokeWidth: +e.target.value }));
|
|
251
|
+
} })))),
|
|
252
|
+
symbologyTab === 'radius' && (React.createElement("div", { className: "jp-gis-symbology-row" },
|
|
253
|
+
React.createElement("label", null, "Circle Radius:"),
|
|
254
|
+
React.createElement("input", { type: "number", className: "jp-mod-styled", value: radiusManualStyle.radius, onChange: e => {
|
|
255
|
+
handleReset('radius');
|
|
256
|
+
setRadiusManualStyle(Object.assign(Object.assign({}, radiusManualStyle), { radius: +e.target.value }));
|
|
257
|
+
} })))),
|
|
258
|
+
React.createElement(ColorRamp, { layerParams: layer.parameters, modeOptions: modeOptions, classifyFunc: buildColorInfoFromClassification, showModeRow: true, showRampSelector: symbologyTab === 'color' }),
|
|
259
|
+
React.createElement(StopContainer, { selectedMethod: symbologyTab || 'color', stopRows: symbologyTab === 'color' ? colorStopRows : radiusStopRows, setStopRows: symbologyTab === 'color' ? setColorStopRows : setRadiusStopRows })));
|
|
260
|
+
}
|
|
261
|
+
})();
|
|
164
262
|
return (React.createElement("div", { className: "jp-gis-layer-symbology-container" },
|
|
165
|
-
React.createElement(
|
|
166
|
-
|
|
167
|
-
React.createElement("label", { htmlFor: 'vector-method-select' }, "Method:"),
|
|
168
|
-
React.createElement("select", { name: 'vector-method-select', onChange: event => setSelectedMethod(event.target.value), className: "jp-mod-styled" }, methodOptions.map((method, index) => (React.createElement("option", { key: index, value: method, selected: method === selectedMethod, className: "jp-mod-styled" }, method))))),
|
|
169
|
-
React.createElement(ColorRamp, { layerParams: layer.parameters, modeOptions: modeOptions, classifyFunc: buildColorInfoFromClassification, showModeRow: true }),
|
|
170
|
-
React.createElement(StopContainer, { selectedMethod: selectedMethod, stopRows: stopRows, setStopRows: setStopRows })));
|
|
263
|
+
React.createElement("p", null, "Color features based on an attribute containing scalar values."),
|
|
264
|
+
body));
|
|
171
265
|
};
|
|
172
266
|
export default Graduated;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ISymbologyDialogProps } from
|
|
3
|
-
declare const Heatmap:
|
|
2
|
+
import { ISymbologyDialogProps } from "../../symbologyDialog";
|
|
3
|
+
declare const Heatmap: React.FC<ISymbologyDialogProps>;
|
|
4
4
|
export default Heatmap;
|