@planet/maps 10.3.0 → 11.0.0-dev.1740075628963
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/Map.js +43 -32
- package/Overlay.js +4 -6
- package/View.js +4 -6
- package/control/Attribution.js +4 -6
- package/control/Control.js +4 -6
- package/control/FullScreen.js +4 -6
- package/control/MousePosition.js +4 -6
- package/control/OverviewMap.js +4 -6
- package/control/Rotate.js +4 -6
- package/control/ScaleLine.js +4 -6
- package/control/Zoom.js +4 -6
- package/control/ZoomSlider.js +4 -6
- package/control/ZoomToExtent.js +4 -6
- package/interaction/DblClickDragZoom.js +4 -6
- package/interaction/DoubleClickZoom.js +4 -6
- package/interaction/DragAndDrop.js +4 -6
- package/interaction/DragBox.js +4 -6
- package/interaction/DragPan.js +4 -6
- package/interaction/DragRotate.js +4 -6
- package/interaction/DragRotateAndZoom.js +4 -10
- package/interaction/DragZoom.js +4 -6
- package/interaction/Draw.js +4 -6
- package/interaction/Extent.js +4 -6
- package/interaction/Interaction.js +4 -6
- package/interaction/KeyboardPan.js +4 -6
- package/interaction/KeyboardZoom.js +4 -6
- package/interaction/Link.js +4 -6
- package/interaction/Modify.js +4 -6
- package/interaction/MouseWheelZoom.js +4 -6
- package/interaction/PinchRotate.js +4 -6
- package/interaction/PinchZoom.js +4 -6
- package/interaction/Pointer.js +4 -6
- package/interaction/Property.js +4 -6
- package/interaction/Select.js +4 -6
- package/interaction/Snap.js +4 -6
- package/interaction/Translate.js +4 -6
- package/internal/config.js +1 -0
- package/internal/render.js +103 -20
- package/internal/update.js +1 -0
- package/layer/Base.js +4 -6
- package/layer/BaseImage.js +4 -6
- package/layer/BaseTile.js +4 -6
- package/layer/BaseVector.js +4 -6
- package/layer/Flow.js +4 -6
- package/layer/Graticule.js +4 -6
- package/layer/Group.js +4 -6
- package/layer/Heatmap.js +4 -6
- package/layer/Image.js +4 -6
- package/layer/Layer.js +4 -6
- package/layer/MapboxVector.js +4 -10
- package/layer/Tile.js +4 -6
- package/layer/Vector.js +4 -6
- package/layer/VectorImage.js +4 -6
- package/layer/VectorTile.js +4 -6
- package/layer/WebGLPoints.js +4 -6
- package/layer/WebGLTile.js +4 -6
- package/layer/WebGLVector.js +4 -6
- package/package.json +28 -14
- package/source/BingMaps.js +4 -6
- package/source/CartoDB.js +4 -6
- package/source/Cluster.js +4 -6
- package/source/DataTile.js +4 -6
- package/source/GeoTIFF.js +4 -6
- package/source/Google.js +4 -6
- package/source/IIIF.js +4 -6
- package/source/Image.js +4 -6
- package/source/ImageArcGISRest.js +4 -6
- package/source/ImageCanvas.js +4 -6
- package/source/ImageMapGuide.js +4 -6
- package/source/ImageStatic.js +4 -6
- package/source/ImageTile.js +4 -6
- package/source/ImageWMS.js +4 -6
- package/source/OGCMapTile.js +4 -6
- package/source/OGCVectorTile.js +4 -6
- package/source/OSM.js +4 -6
- package/source/Raster.js +4 -6
- package/source/SentinelHub.js +4 -6
- package/source/Source.js +4 -6
- package/source/StadiaMaps.js +4 -6
- package/source/Tile.js +4 -6
- package/source/TileArcGISRest.js +4 -6
- package/source/TileDebug.js +4 -6
- package/source/TileImage.js +4 -6
- package/source/TileJSON.js +4 -6
- package/source/TileWMS.js +4 -6
- package/source/UTFGrid.js +4 -6
- package/source/UrlTile.js +4 -6
- package/source/Vector.js +4 -6
- package/source/VectorTile.js +4 -6
- package/source/WMTS.js +4 -6
- package/source/XYZ.js +4 -6
- package/source/Zoomify.js +4 -6
package/interaction/Snap.js
CHANGED
|
@@ -15,10 +15,8 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
import OLSnap from 'ol/interaction/Snap.js';
|
|
18
|
-
import {createElement
|
|
18
|
+
import {createElement} from 'react';
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
return createElement('interaction', {cls: OLSnap,
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export default Snap;
|
|
20
|
+
export default function Snap(props) {
|
|
21
|
+
return createElement('interaction', {cls: OLSnap, ...props});
|
|
22
|
+
}
|
package/interaction/Translate.js
CHANGED
|
@@ -15,10 +15,8 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
import OLTranslate from 'ol/interaction/Translate.js';
|
|
18
|
-
import {createElement
|
|
18
|
+
import {createElement} from 'react';
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
return createElement('interaction', {cls: OLTranslate,
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export default Translate;
|
|
20
|
+
export default function Translate(props) {
|
|
21
|
+
return createElement('interaction', {cls: OLTranslate, ...props});
|
|
22
|
+
}
|
package/internal/config.js
CHANGED
package/internal/render.js
CHANGED
|
@@ -10,6 +10,7 @@ import {CONTROL, INTERACTION, LAYER, OVERLAY, SOURCE, VIEW} from './config.js';
|
|
|
10
10
|
import {
|
|
11
11
|
ConcurrentRoot,
|
|
12
12
|
DefaultEventPriority,
|
|
13
|
+
NoEventPriority,
|
|
13
14
|
} from 'react-reconciler/constants.js';
|
|
14
15
|
import {
|
|
15
16
|
prepareControlUpdate,
|
|
@@ -41,20 +42,52 @@ const knownTypes = {
|
|
|
41
42
|
[SOURCE]: true,
|
|
42
43
|
};
|
|
43
44
|
|
|
44
|
-
|
|
45
|
-
|
|
45
|
+
/**
|
|
46
|
+
* @param {Array} a1 An array.
|
|
47
|
+
* @param {Array} a2 An array.
|
|
48
|
+
* @return {boolean} All elements in the array are the same;
|
|
49
|
+
*/
|
|
50
|
+
function arrayEquals(a1, a2) {
|
|
51
|
+
if (!a1 || !a2) {
|
|
52
|
+
return false;
|
|
53
|
+
}
|
|
54
|
+
const len1 = a1.length;
|
|
55
|
+
const len2 = a2.length;
|
|
56
|
+
if (len1 !== len2) {
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
59
|
+
for (let i = 0; i < len1; i += 1) {
|
|
60
|
+
const v1 = a1[i];
|
|
61
|
+
const v2 = a2[i];
|
|
62
|
+
if (v1 !== v2) {
|
|
63
|
+
return false;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return true;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function updateInstanceFromProps(instance, type, oldProps, newProps) {
|
|
70
|
+
for (const key in newProps) {
|
|
46
71
|
if (reservedProps[key]) {
|
|
47
72
|
continue;
|
|
48
73
|
}
|
|
74
|
+
const newValue = newProps[key];
|
|
75
|
+
const oldValue = oldProps[key];
|
|
76
|
+
if (oldValue === newValue) {
|
|
77
|
+
continue;
|
|
78
|
+
}
|
|
79
|
+
|
|
49
80
|
if (listenerRegex.test(key)) {
|
|
50
|
-
const listener =
|
|
51
|
-
const
|
|
81
|
+
const listener = newProps[key];
|
|
82
|
+
const eventType = key
|
|
52
83
|
.replace(listenerColonRegex, 'onChange:')
|
|
53
84
|
.replace(listenerRegex, '$1')
|
|
54
85
|
.toLowerCase();
|
|
55
|
-
instance.on(
|
|
56
|
-
|
|
57
|
-
|
|
86
|
+
instance.on(eventType, listener);
|
|
87
|
+
|
|
88
|
+
const oldListener = oldProps[key];
|
|
89
|
+
if (oldListener) {
|
|
90
|
+
instance.un(eventType, oldListener);
|
|
58
91
|
if (instance.changed) {
|
|
59
92
|
instance.changed();
|
|
60
93
|
}
|
|
@@ -62,16 +95,20 @@ export function updateInstanceFromProps(instance, props, oldProps = {}) {
|
|
|
62
95
|
continue;
|
|
63
96
|
}
|
|
64
97
|
|
|
98
|
+
if (key === 'center' && arrayEquals(newValue, oldValue)) {
|
|
99
|
+
continue;
|
|
100
|
+
}
|
|
101
|
+
|
|
65
102
|
const setter = setterName(key);
|
|
66
103
|
if (typeof instance[setter] === 'function') {
|
|
67
|
-
instance[setter](
|
|
104
|
+
instance[setter](newValue);
|
|
68
105
|
continue;
|
|
69
106
|
}
|
|
70
107
|
|
|
71
108
|
if (key === 'features' && typeof instance.addFeatures === 'function') {
|
|
72
109
|
// TODO: there is likely a smarter way to diff features
|
|
73
110
|
instance.clear(true);
|
|
74
|
-
instance.addFeatures(
|
|
111
|
+
instance.addFeatures(newValue);
|
|
75
112
|
continue;
|
|
76
113
|
}
|
|
77
114
|
|
|
@@ -80,12 +117,12 @@ export function updateInstanceFromProps(instance, props, oldProps = {}) {
|
|
|
80
117
|
typeof instance.addInteraction === 'function'
|
|
81
118
|
) {
|
|
82
119
|
instance.getInteractions().clear();
|
|
83
|
-
|
|
120
|
+
newValue.forEach(interaction => instance.addInteraction(interaction));
|
|
84
121
|
continue;
|
|
85
122
|
}
|
|
86
123
|
if (key === 'controls' && typeof instance.addControl === 'function') {
|
|
87
124
|
instance.getControls().clear();
|
|
88
|
-
|
|
125
|
+
newValue.forEach(control => instance.addControl(control));
|
|
89
126
|
continue;
|
|
90
127
|
}
|
|
91
128
|
|
|
@@ -102,7 +139,7 @@ function createInstance(type, {cls: Constructor, ...props}) {
|
|
|
102
139
|
}
|
|
103
140
|
|
|
104
141
|
const instance = new Constructor(props.options || {});
|
|
105
|
-
updateInstanceFromProps(instance, props);
|
|
142
|
+
updateInstanceFromProps(instance, type, {}, props);
|
|
106
143
|
return instance;
|
|
107
144
|
}
|
|
108
145
|
|
|
@@ -167,8 +204,8 @@ function prepareUpdate(instance, type, oldProps, newProps) {
|
|
|
167
204
|
return updater(instance, type, oldProps, newProps);
|
|
168
205
|
}
|
|
169
206
|
|
|
170
|
-
function commitUpdate(instance,
|
|
171
|
-
updateInstanceFromProps(instance,
|
|
207
|
+
function commitUpdate(instance, type, oldProps, newProps) {
|
|
208
|
+
updateInstanceFromProps(instance, type, oldProps, newProps);
|
|
172
209
|
}
|
|
173
210
|
|
|
174
211
|
function removeChildFromContainer(map, child) {
|
|
@@ -247,6 +284,9 @@ function insertBefore(parent, child, beforeChild) {
|
|
|
247
284
|
throw new Error(`Cannot insert child ${child} into parent ${parent}`);
|
|
248
285
|
}
|
|
249
286
|
|
|
287
|
+
const noContext = {};
|
|
288
|
+
let currentUpdatePriority = NoEventPriority;
|
|
289
|
+
|
|
250
290
|
const reconciler = ReactReconciler({
|
|
251
291
|
supportsMutation: true,
|
|
252
292
|
isPrimaryRenderer: false,
|
|
@@ -260,21 +300,66 @@ const reconciler = ReactReconciler({
|
|
|
260
300
|
clearContainer,
|
|
261
301
|
removeChildFromContainer,
|
|
262
302
|
removeChild,
|
|
263
|
-
|
|
264
303
|
insertInContainerBefore,
|
|
265
304
|
insertBefore,
|
|
305
|
+
noTimeout: -1,
|
|
306
|
+
|
|
307
|
+
getInstanceFromNode() {
|
|
308
|
+
return null;
|
|
309
|
+
},
|
|
310
|
+
|
|
311
|
+
shouldAttemptEagerTransition() {
|
|
312
|
+
return false;
|
|
313
|
+
},
|
|
314
|
+
|
|
315
|
+
requestPostPaintCallback() {},
|
|
316
|
+
|
|
317
|
+
maySuspendCommit() {
|
|
318
|
+
return false;
|
|
319
|
+
},
|
|
320
|
+
|
|
321
|
+
preloadInstance() {
|
|
322
|
+
return true;
|
|
323
|
+
},
|
|
324
|
+
|
|
325
|
+
startSuspendingCommit() {},
|
|
326
|
+
|
|
327
|
+
suspendInstance() {},
|
|
328
|
+
|
|
329
|
+
waitForCommitToBeReady() {
|
|
330
|
+
return null;
|
|
331
|
+
},
|
|
332
|
+
|
|
333
|
+
setCurrentUpdatePriority(newPriority) {
|
|
334
|
+
currentUpdatePriority = newPriority;
|
|
335
|
+
},
|
|
336
|
+
|
|
337
|
+
getCurrentUpdatePriority() {
|
|
338
|
+
return currentUpdatePriority;
|
|
339
|
+
},
|
|
340
|
+
|
|
341
|
+
resolveUpdatePriority() {
|
|
342
|
+
if (currentUpdatePriority) {
|
|
343
|
+
return currentUpdatePriority;
|
|
344
|
+
}
|
|
345
|
+
return DefaultEventPriority;
|
|
346
|
+
},
|
|
266
347
|
|
|
267
348
|
finalizeInitialChildren() {
|
|
268
349
|
return false;
|
|
269
350
|
},
|
|
270
351
|
|
|
271
|
-
getChildHostContext() {
|
|
352
|
+
getChildHostContext() {
|
|
353
|
+
return noContext;
|
|
354
|
+
},
|
|
272
355
|
|
|
273
356
|
getPublicInstance(instance) {
|
|
274
357
|
return instance;
|
|
275
358
|
},
|
|
276
359
|
|
|
277
|
-
getRootHostContext() {
|
|
360
|
+
getRootHostContext() {
|
|
361
|
+
return noContext;
|
|
362
|
+
},
|
|
278
363
|
|
|
279
364
|
getCurrentEventPriority() {
|
|
280
365
|
return DefaultEventPriority;
|
|
@@ -299,9 +384,7 @@ export function render(element, container) {
|
|
|
299
384
|
let root = roots.get(container);
|
|
300
385
|
if (!root) {
|
|
301
386
|
const logRecoverableError =
|
|
302
|
-
typeof reportError === 'function'
|
|
303
|
-
? reportError // eslint-disable-line no-undef
|
|
304
|
-
: console.error; // eslint-disable-line no-console
|
|
387
|
+
typeof reportError === 'function' ? reportError : console.error; // eslint-disable-line no-console
|
|
305
388
|
|
|
306
389
|
root = reconciler.createContainer(
|
|
307
390
|
container,
|
package/internal/update.js
CHANGED
package/layer/Base.js
CHANGED
|
@@ -16,14 +16,12 @@
|
|
|
16
16
|
*/
|
|
17
17
|
import OLBase from 'ol/layer/Base.js';
|
|
18
18
|
import propTypes from 'prop-types';
|
|
19
|
-
import {createElement
|
|
19
|
+
import {createElement} from 'react';
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
return createElement('layer', {cls: OLBase,
|
|
23
|
-
}
|
|
21
|
+
export default function Base({children, ...props}) {
|
|
22
|
+
return createElement('layer', {cls: OLBase, ...props}, children);
|
|
23
|
+
}
|
|
24
24
|
|
|
25
25
|
Base.propTypes = {
|
|
26
26
|
children: propTypes.node,
|
|
27
27
|
};
|
|
28
|
-
|
|
29
|
-
export default Base;
|
package/layer/BaseImage.js
CHANGED
|
@@ -16,14 +16,12 @@
|
|
|
16
16
|
*/
|
|
17
17
|
import OLBaseImage from 'ol/layer/BaseImage.js';
|
|
18
18
|
import propTypes from 'prop-types';
|
|
19
|
-
import {createElement
|
|
19
|
+
import {createElement} from 'react';
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
return createElement('layer', {cls: OLBaseImage,
|
|
23
|
-
}
|
|
21
|
+
export default function BaseImage({children, ...props}) {
|
|
22
|
+
return createElement('layer', {cls: OLBaseImage, ...props}, children);
|
|
23
|
+
}
|
|
24
24
|
|
|
25
25
|
BaseImage.propTypes = {
|
|
26
26
|
children: propTypes.node,
|
|
27
27
|
};
|
|
28
|
-
|
|
29
|
-
export default BaseImage;
|
package/layer/BaseTile.js
CHANGED
|
@@ -16,14 +16,12 @@
|
|
|
16
16
|
*/
|
|
17
17
|
import OLBaseTile from 'ol/layer/BaseTile.js';
|
|
18
18
|
import propTypes from 'prop-types';
|
|
19
|
-
import {createElement
|
|
19
|
+
import {createElement} from 'react';
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
return createElement('layer', {cls: OLBaseTile,
|
|
23
|
-
}
|
|
21
|
+
export default function BaseTile({children, ...props}) {
|
|
22
|
+
return createElement('layer', {cls: OLBaseTile, ...props}, children);
|
|
23
|
+
}
|
|
24
24
|
|
|
25
25
|
BaseTile.propTypes = {
|
|
26
26
|
children: propTypes.node,
|
|
27
27
|
};
|
|
28
|
-
|
|
29
|
-
export default BaseTile;
|
package/layer/BaseVector.js
CHANGED
|
@@ -16,14 +16,12 @@
|
|
|
16
16
|
*/
|
|
17
17
|
import OLBaseVector from 'ol/layer/BaseVector.js';
|
|
18
18
|
import propTypes from 'prop-types';
|
|
19
|
-
import {createElement
|
|
19
|
+
import {createElement} from 'react';
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
return createElement('layer', {cls: OLBaseVector,
|
|
23
|
-
}
|
|
21
|
+
export default function BaseVector({children, ...props}) {
|
|
22
|
+
return createElement('layer', {cls: OLBaseVector, ...props}, children);
|
|
23
|
+
}
|
|
24
24
|
|
|
25
25
|
BaseVector.propTypes = {
|
|
26
26
|
children: propTypes.node,
|
|
27
27
|
};
|
|
28
|
-
|
|
29
|
-
export default BaseVector;
|
package/layer/Flow.js
CHANGED
|
@@ -16,14 +16,12 @@
|
|
|
16
16
|
*/
|
|
17
17
|
import OLFlow from 'ol/layer/Flow.js';
|
|
18
18
|
import propTypes from 'prop-types';
|
|
19
|
-
import {createElement
|
|
19
|
+
import {createElement} from 'react';
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
return createElement('layer', {cls: OLFlow,
|
|
23
|
-
}
|
|
21
|
+
export default function Flow({children, ...props}) {
|
|
22
|
+
return createElement('layer', {cls: OLFlow, ...props}, children);
|
|
23
|
+
}
|
|
24
24
|
|
|
25
25
|
Flow.propTypes = {
|
|
26
26
|
children: propTypes.node,
|
|
27
27
|
};
|
|
28
|
-
|
|
29
|
-
export default Flow;
|
package/layer/Graticule.js
CHANGED
|
@@ -16,14 +16,12 @@
|
|
|
16
16
|
*/
|
|
17
17
|
import OLGraticule from 'ol/layer/Graticule.js';
|
|
18
18
|
import propTypes from 'prop-types';
|
|
19
|
-
import {createElement
|
|
19
|
+
import {createElement} from 'react';
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
return createElement('layer', {cls: OLGraticule,
|
|
23
|
-
}
|
|
21
|
+
export default function Graticule({children, ...props}) {
|
|
22
|
+
return createElement('layer', {cls: OLGraticule, ...props}, children);
|
|
23
|
+
}
|
|
24
24
|
|
|
25
25
|
Graticule.propTypes = {
|
|
26
26
|
children: propTypes.node,
|
|
27
27
|
};
|
|
28
|
-
|
|
29
|
-
export default Graticule;
|
package/layer/Group.js
CHANGED
|
@@ -16,14 +16,12 @@
|
|
|
16
16
|
*/
|
|
17
17
|
import OLGroup from 'ol/layer/Group.js';
|
|
18
18
|
import propTypes from 'prop-types';
|
|
19
|
-
import {createElement
|
|
19
|
+
import {createElement} from 'react';
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
return createElement('layer', {cls: OLGroup,
|
|
23
|
-
}
|
|
21
|
+
export default function Group({children, ...props}) {
|
|
22
|
+
return createElement('layer', {cls: OLGroup, ...props}, children);
|
|
23
|
+
}
|
|
24
24
|
|
|
25
25
|
Group.propTypes = {
|
|
26
26
|
children: propTypes.node,
|
|
27
27
|
};
|
|
28
|
-
|
|
29
|
-
export default Group;
|
package/layer/Heatmap.js
CHANGED
|
@@ -16,14 +16,12 @@
|
|
|
16
16
|
*/
|
|
17
17
|
import OLHeatmap from 'ol/layer/Heatmap.js';
|
|
18
18
|
import propTypes from 'prop-types';
|
|
19
|
-
import {createElement
|
|
19
|
+
import {createElement} from 'react';
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
return createElement('layer', {cls: OLHeatmap,
|
|
23
|
-
}
|
|
21
|
+
export default function Heatmap({children, ...props}) {
|
|
22
|
+
return createElement('layer', {cls: OLHeatmap, ...props}, children);
|
|
23
|
+
}
|
|
24
24
|
|
|
25
25
|
Heatmap.propTypes = {
|
|
26
26
|
children: propTypes.node,
|
|
27
27
|
};
|
|
28
|
-
|
|
29
|
-
export default Heatmap;
|
package/layer/Image.js
CHANGED
|
@@ -16,14 +16,12 @@
|
|
|
16
16
|
*/
|
|
17
17
|
import OLImage from 'ol/layer/Image.js';
|
|
18
18
|
import propTypes from 'prop-types';
|
|
19
|
-
import {createElement
|
|
19
|
+
import {createElement} from 'react';
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
return createElement('layer', {cls: OLImage,
|
|
23
|
-
}
|
|
21
|
+
export default function Image({children, ...props}) {
|
|
22
|
+
return createElement('layer', {cls: OLImage, ...props}, children);
|
|
23
|
+
}
|
|
24
24
|
|
|
25
25
|
Image.propTypes = {
|
|
26
26
|
children: propTypes.node,
|
|
27
27
|
};
|
|
28
|
-
|
|
29
|
-
export default Image;
|
package/layer/Layer.js
CHANGED
|
@@ -16,14 +16,12 @@
|
|
|
16
16
|
*/
|
|
17
17
|
import OLLayer from 'ol/layer/Layer.js';
|
|
18
18
|
import propTypes from 'prop-types';
|
|
19
|
-
import {createElement
|
|
19
|
+
import {createElement} from 'react';
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
return createElement('layer', {cls: OLLayer,
|
|
23
|
-
}
|
|
21
|
+
export default function Layer({children, ...props}) {
|
|
22
|
+
return createElement('layer', {cls: OLLayer, ...props}, children);
|
|
23
|
+
}
|
|
24
24
|
|
|
25
25
|
Layer.propTypes = {
|
|
26
26
|
children: propTypes.node,
|
|
27
27
|
};
|
|
28
|
-
|
|
29
|
-
export default Layer;
|
package/layer/MapboxVector.js
CHANGED
|
@@ -16,18 +16,12 @@
|
|
|
16
16
|
*/
|
|
17
17
|
import propTypes from 'prop-types';
|
|
18
18
|
import {MapboxVectorLayer as OLMBVectorLayer} from 'ol-mapbox-style';
|
|
19
|
-
import {createElement
|
|
19
|
+
import {createElement} from 'react';
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
return createElement(
|
|
23
|
-
|
|
24
|
-
{cls: OLMBVectorLayer, ref, ...props},
|
|
25
|
-
children,
|
|
26
|
-
);
|
|
27
|
-
});
|
|
21
|
+
export default function MapboxVector({children, ...props}) {
|
|
22
|
+
return createElement('layer', {cls: OLMBVectorLayer, ...props}, children);
|
|
23
|
+
}
|
|
28
24
|
|
|
29
25
|
MapboxVector.propTypes = {
|
|
30
26
|
children: propTypes.node,
|
|
31
27
|
};
|
|
32
|
-
|
|
33
|
-
export default MapboxVector;
|
package/layer/Tile.js
CHANGED
|
@@ -16,14 +16,12 @@
|
|
|
16
16
|
*/
|
|
17
17
|
import OLTile from 'ol/layer/Tile.js';
|
|
18
18
|
import propTypes from 'prop-types';
|
|
19
|
-
import {createElement
|
|
19
|
+
import {createElement} from 'react';
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
return createElement('layer', {cls: OLTile,
|
|
23
|
-
}
|
|
21
|
+
export default function Tile({children, ...props}) {
|
|
22
|
+
return createElement('layer', {cls: OLTile, ...props}, children);
|
|
23
|
+
}
|
|
24
24
|
|
|
25
25
|
Tile.propTypes = {
|
|
26
26
|
children: propTypes.node,
|
|
27
27
|
};
|
|
28
|
-
|
|
29
|
-
export default Tile;
|
package/layer/Vector.js
CHANGED
|
@@ -16,14 +16,12 @@
|
|
|
16
16
|
*/
|
|
17
17
|
import OLVector from 'ol/layer/Vector.js';
|
|
18
18
|
import propTypes from 'prop-types';
|
|
19
|
-
import {createElement
|
|
19
|
+
import {createElement} from 'react';
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
return createElement('layer', {cls: OLVector,
|
|
23
|
-
}
|
|
21
|
+
export default function Vector({children, ...props}) {
|
|
22
|
+
return createElement('layer', {cls: OLVector, ...props}, children);
|
|
23
|
+
}
|
|
24
24
|
|
|
25
25
|
Vector.propTypes = {
|
|
26
26
|
children: propTypes.node,
|
|
27
27
|
};
|
|
28
|
-
|
|
29
|
-
export default Vector;
|
package/layer/VectorImage.js
CHANGED
|
@@ -16,14 +16,12 @@
|
|
|
16
16
|
*/
|
|
17
17
|
import OLVectorImage from 'ol/layer/VectorImage.js';
|
|
18
18
|
import propTypes from 'prop-types';
|
|
19
|
-
import {createElement
|
|
19
|
+
import {createElement} from 'react';
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
return createElement('layer', {cls: OLVectorImage,
|
|
23
|
-
}
|
|
21
|
+
export default function VectorImage({children, ...props}) {
|
|
22
|
+
return createElement('layer', {cls: OLVectorImage, ...props}, children);
|
|
23
|
+
}
|
|
24
24
|
|
|
25
25
|
VectorImage.propTypes = {
|
|
26
26
|
children: propTypes.node,
|
|
27
27
|
};
|
|
28
|
-
|
|
29
|
-
export default VectorImage;
|
package/layer/VectorTile.js
CHANGED
|
@@ -16,14 +16,12 @@
|
|
|
16
16
|
*/
|
|
17
17
|
import OLVectorTile from 'ol/layer/VectorTile.js';
|
|
18
18
|
import propTypes from 'prop-types';
|
|
19
|
-
import {createElement
|
|
19
|
+
import {createElement} from 'react';
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
return createElement('layer', {cls: OLVectorTile,
|
|
23
|
-
}
|
|
21
|
+
export default function VectorTile({children, ...props}) {
|
|
22
|
+
return createElement('layer', {cls: OLVectorTile, ...props}, children);
|
|
23
|
+
}
|
|
24
24
|
|
|
25
25
|
VectorTile.propTypes = {
|
|
26
26
|
children: propTypes.node,
|
|
27
27
|
};
|
|
28
|
-
|
|
29
|
-
export default VectorTile;
|
package/layer/WebGLPoints.js
CHANGED
|
@@ -16,14 +16,12 @@
|
|
|
16
16
|
*/
|
|
17
17
|
import OLWebGLPoints from 'ol/layer/WebGLPoints.js';
|
|
18
18
|
import propTypes from 'prop-types';
|
|
19
|
-
import {createElement
|
|
19
|
+
import {createElement} from 'react';
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
return createElement('layer', {cls: OLWebGLPoints,
|
|
23
|
-
}
|
|
21
|
+
export default function WebGLPoints({children, ...props}) {
|
|
22
|
+
return createElement('layer', {cls: OLWebGLPoints, ...props}, children);
|
|
23
|
+
}
|
|
24
24
|
|
|
25
25
|
WebGLPoints.propTypes = {
|
|
26
26
|
children: propTypes.node,
|
|
27
27
|
};
|
|
28
|
-
|
|
29
|
-
export default WebGLPoints;
|
package/layer/WebGLTile.js
CHANGED
|
@@ -16,14 +16,12 @@
|
|
|
16
16
|
*/
|
|
17
17
|
import OLWebGLTile from 'ol/layer/WebGLTile.js';
|
|
18
18
|
import propTypes from 'prop-types';
|
|
19
|
-
import {createElement
|
|
19
|
+
import {createElement} from 'react';
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
return createElement('layer', {cls: OLWebGLTile,
|
|
23
|
-
}
|
|
21
|
+
export default function WebGLTile({children, ...props}) {
|
|
22
|
+
return createElement('layer', {cls: OLWebGLTile, ...props}, children);
|
|
23
|
+
}
|
|
24
24
|
|
|
25
25
|
WebGLTile.propTypes = {
|
|
26
26
|
children: propTypes.node,
|
|
27
27
|
};
|
|
28
|
-
|
|
29
|
-
export default WebGLTile;
|
package/layer/WebGLVector.js
CHANGED
|
@@ -16,14 +16,12 @@
|
|
|
16
16
|
*/
|
|
17
17
|
import OLWebGLVector from 'ol/layer/WebGLVector.js';
|
|
18
18
|
import propTypes from 'prop-types';
|
|
19
|
-
import {createElement
|
|
19
|
+
import {createElement} from 'react';
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
return createElement('layer', {cls: OLWebGLVector,
|
|
23
|
-
}
|
|
21
|
+
export default function WebGLVector({children, ...props}) {
|
|
22
|
+
return createElement('layer', {cls: OLWebGLVector, ...props}, children);
|
|
23
|
+
}
|
|
24
24
|
|
|
25
25
|
WebGLVector.propTypes = {
|
|
26
26
|
children: propTypes.node,
|
|
27
27
|
};
|
|
28
|
-
|
|
29
|
-
export default WebGLVector;
|