@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/Map.js
CHANGED
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import OLMap from 'ol/Map.js';
|
|
17
17
|
import propTypes from 'prop-types';
|
|
18
|
-
import {
|
|
18
|
+
import {MAP} from './internal/config.js';
|
|
19
|
+
import {createElement, useCallback, useEffect, useRef} from 'react';
|
|
19
20
|
import {render, updateInstanceFromProps} from './internal/render.js';
|
|
20
21
|
|
|
21
22
|
const defaultDivStyle = {
|
|
@@ -23,38 +24,51 @@ const defaultDivStyle = {
|
|
|
23
24
|
width: '100%',
|
|
24
25
|
};
|
|
25
26
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
export default function Map({
|
|
28
|
+
id,
|
|
29
|
+
style = defaultDivStyle,
|
|
30
|
+
className,
|
|
31
|
+
children,
|
|
32
|
+
ref,
|
|
33
|
+
options,
|
|
34
|
+
...mapProps
|
|
35
|
+
}) {
|
|
36
|
+
const targetRef = useRef();
|
|
37
|
+
const mapRef = useRef();
|
|
29
38
|
|
|
30
|
-
|
|
39
|
+
const getMap = useCallback(() => {
|
|
40
|
+
// avoid creating new map when options object is different
|
|
41
|
+
if (mapRef.current) {
|
|
42
|
+
return mapRef.current;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const map = new OLMap(options);
|
|
46
|
+
mapRef.current = map;
|
|
47
|
+
return map;
|
|
48
|
+
}, [options]);
|
|
31
49
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
50
|
+
useEffect(() => {
|
|
51
|
+
const map = getMap();
|
|
52
|
+
map.setTarget(targetRef.current);
|
|
53
|
+
}, [getMap]);
|
|
54
|
+
|
|
55
|
+
useEffect(() => {
|
|
56
|
+
const map = getMap();
|
|
57
|
+
if (ref) {
|
|
58
|
+
if (typeof ref === 'function') {
|
|
59
|
+
ref(map);
|
|
37
60
|
} else {
|
|
38
|
-
|
|
61
|
+
ref.current = map;
|
|
39
62
|
}
|
|
40
63
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
componentDidUpdate() {
|
|
50
|
-
// TODO: apply map prop changes
|
|
51
|
-
render(this.props.children, this.map);
|
|
52
|
-
}
|
|
64
|
+
if (!mapRef.current) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
updateInstanceFromProps(map, MAP, {}, mapProps);
|
|
68
|
+
render(children, map);
|
|
69
|
+
}, [children, getMap, mapProps, ref]);
|
|
53
70
|
|
|
54
|
-
|
|
55
|
-
const {id, style = defaultDivStyle, className} = this.props;
|
|
56
|
-
return createElement('div', {ref: this.targetRef, id, style, className});
|
|
57
|
-
}
|
|
71
|
+
return createElement('div', {ref: targetRef, id, style, className});
|
|
58
72
|
}
|
|
59
73
|
|
|
60
74
|
Map.propTypes = {
|
|
@@ -62,12 +76,9 @@ Map.propTypes = {
|
|
|
62
76
|
id: propTypes.string,
|
|
63
77
|
style: propTypes.object,
|
|
64
78
|
children: propTypes.node,
|
|
65
|
-
|
|
79
|
+
options: propTypes.object,
|
|
80
|
+
ref: propTypes.oneOfType([
|
|
66
81
|
propTypes.func,
|
|
67
82
|
propTypes.shape({current: propTypes.any}),
|
|
68
83
|
]),
|
|
69
84
|
};
|
|
70
|
-
|
|
71
|
-
export default forwardRef((props, ref) =>
|
|
72
|
-
createElement(Map, {innerRef: ref, ...props}),
|
|
73
|
-
);
|
package/Overlay.js
CHANGED
|
@@ -15,10 +15,8 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import OLOverlay from 'ol/Overlay.js';
|
|
17
17
|
import {OVERLAY} from './internal/config.js';
|
|
18
|
-
import {createElement
|
|
18
|
+
import {createElement} from 'react';
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
return createElement(OVERLAY, {cls: OLOverlay,
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export default Overlay;
|
|
20
|
+
export default function Overlay(props) {
|
|
21
|
+
return createElement(OVERLAY, {cls: OLOverlay, ...props});
|
|
22
|
+
}
|
package/View.js
CHANGED
|
@@ -15,10 +15,8 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import OLView from 'ol/View.js';
|
|
17
17
|
import {VIEW} from './internal/config.js';
|
|
18
|
-
import {createElement
|
|
18
|
+
import {createElement} from 'react';
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
return createElement(VIEW, {cls: OLView,
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export default View;
|
|
20
|
+
export default function View(props) {
|
|
21
|
+
return createElement(VIEW, {cls: OLView, ...props});
|
|
22
|
+
}
|
package/control/Attribution.js
CHANGED
|
@@ -15,10 +15,8 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
import OLAttribution from 'ol/control/Attribution.js';
|
|
18
|
-
import {createElement
|
|
18
|
+
import {createElement} from 'react';
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
return createElement('control', {cls: OLAttribution,
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export default Attribution;
|
|
20
|
+
export default function Attribution(props) {
|
|
21
|
+
return createElement('control', {cls: OLAttribution, ...props});
|
|
22
|
+
}
|
package/control/Control.js
CHANGED
|
@@ -15,10 +15,8 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
import OLControl from 'ol/control/Control.js';
|
|
18
|
-
import {createElement
|
|
18
|
+
import {createElement} from 'react';
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
return createElement('control', {cls: OLControl,
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export default Control;
|
|
20
|
+
export default function Control(props) {
|
|
21
|
+
return createElement('control', {cls: OLControl, ...props});
|
|
22
|
+
}
|
package/control/FullScreen.js
CHANGED
|
@@ -15,10 +15,8 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
import OLFullScreen from 'ol/control/FullScreen.js';
|
|
18
|
-
import {createElement
|
|
18
|
+
import {createElement} from 'react';
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
return createElement('control', {cls: OLFullScreen,
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export default FullScreen;
|
|
20
|
+
export default function FullScreen(props) {
|
|
21
|
+
return createElement('control', {cls: OLFullScreen, ...props});
|
|
22
|
+
}
|
package/control/MousePosition.js
CHANGED
|
@@ -15,10 +15,8 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
import OLMousePosition from 'ol/control/MousePosition.js';
|
|
18
|
-
import {createElement
|
|
18
|
+
import {createElement} from 'react';
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
return createElement('control', {cls: OLMousePosition,
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export default MousePosition;
|
|
20
|
+
export default function MousePosition(props) {
|
|
21
|
+
return createElement('control', {cls: OLMousePosition, ...props});
|
|
22
|
+
}
|
package/control/OverviewMap.js
CHANGED
|
@@ -15,10 +15,8 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
import OLOverviewMap from 'ol/control/OverviewMap.js';
|
|
18
|
-
import {createElement
|
|
18
|
+
import {createElement} from 'react';
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
return createElement('control', {cls: OLOverviewMap,
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export default OverviewMap;
|
|
20
|
+
export default function OverviewMap(props) {
|
|
21
|
+
return createElement('control', {cls: OLOverviewMap, ...props});
|
|
22
|
+
}
|
package/control/Rotate.js
CHANGED
|
@@ -15,10 +15,8 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
import OLRotate from 'ol/control/Rotate.js';
|
|
18
|
-
import {createElement
|
|
18
|
+
import {createElement} from 'react';
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
return createElement('control', {cls: OLRotate,
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export default Rotate;
|
|
20
|
+
export default function Rotate(props) {
|
|
21
|
+
return createElement('control', {cls: OLRotate, ...props});
|
|
22
|
+
}
|
package/control/ScaleLine.js
CHANGED
|
@@ -15,10 +15,8 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
import OLScaleLine from 'ol/control/ScaleLine.js';
|
|
18
|
-
import {createElement
|
|
18
|
+
import {createElement} from 'react';
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
return createElement('control', {cls: OLScaleLine,
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export default ScaleLine;
|
|
20
|
+
export default function ScaleLine(props) {
|
|
21
|
+
return createElement('control', {cls: OLScaleLine, ...props});
|
|
22
|
+
}
|
package/control/Zoom.js
CHANGED
|
@@ -15,10 +15,8 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
import OLZoom from 'ol/control/Zoom.js';
|
|
18
|
-
import {createElement
|
|
18
|
+
import {createElement} from 'react';
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
return createElement('control', {cls: OLZoom,
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export default Zoom;
|
|
20
|
+
export default function Zoom(props) {
|
|
21
|
+
return createElement('control', {cls: OLZoom, ...props});
|
|
22
|
+
}
|
package/control/ZoomSlider.js
CHANGED
|
@@ -15,10 +15,8 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
import OLZoomSlider from 'ol/control/ZoomSlider.js';
|
|
18
|
-
import {createElement
|
|
18
|
+
import {createElement} from 'react';
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
return createElement('control', {cls: OLZoomSlider,
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export default ZoomSlider;
|
|
20
|
+
export default function ZoomSlider(props) {
|
|
21
|
+
return createElement('control', {cls: OLZoomSlider, ...props});
|
|
22
|
+
}
|
package/control/ZoomToExtent.js
CHANGED
|
@@ -15,10 +15,8 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
import OLZoomToExtent from 'ol/control/ZoomToExtent.js';
|
|
18
|
-
import {createElement
|
|
18
|
+
import {createElement} from 'react';
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
return createElement('control', {cls: OLZoomToExtent,
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export default ZoomToExtent;
|
|
20
|
+
export default function ZoomToExtent(props) {
|
|
21
|
+
return createElement('control', {cls: OLZoomToExtent, ...props});
|
|
22
|
+
}
|
|
@@ -15,10 +15,8 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
import OLDblClickDragZoom from 'ol/interaction/DblClickDragZoom.js';
|
|
18
|
-
import {createElement
|
|
18
|
+
import {createElement} from 'react';
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
return createElement('interaction', {cls: OLDblClickDragZoom,
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export default DblClickDragZoom;
|
|
20
|
+
export default function DblClickDragZoom(props) {
|
|
21
|
+
return createElement('interaction', {cls: OLDblClickDragZoom, ...props});
|
|
22
|
+
}
|
|
@@ -15,10 +15,8 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
import OLDoubleClickZoom from 'ol/interaction/DoubleClickZoom.js';
|
|
18
|
-
import {createElement
|
|
18
|
+
import {createElement} from 'react';
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
return createElement('interaction', {cls: OLDoubleClickZoom,
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export default DoubleClickZoom;
|
|
20
|
+
export default function DoubleClickZoom(props) {
|
|
21
|
+
return createElement('interaction', {cls: OLDoubleClickZoom, ...props});
|
|
22
|
+
}
|
|
@@ -15,10 +15,8 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
import OLDragAndDrop from 'ol/interaction/DragAndDrop.js';
|
|
18
|
-
import {createElement
|
|
18
|
+
import {createElement} from 'react';
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
return createElement('interaction', {cls: OLDragAndDrop,
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export default DragAndDrop;
|
|
20
|
+
export default function DragAndDrop(props) {
|
|
21
|
+
return createElement('interaction', {cls: OLDragAndDrop, ...props});
|
|
22
|
+
}
|
package/interaction/DragBox.js
CHANGED
|
@@ -15,10 +15,8 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
import OLDragBox from 'ol/interaction/DragBox.js';
|
|
18
|
-
import {createElement
|
|
18
|
+
import {createElement} from 'react';
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
return createElement('interaction', {cls: OLDragBox,
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export default DragBox;
|
|
20
|
+
export default function DragBox(props) {
|
|
21
|
+
return createElement('interaction', {cls: OLDragBox, ...props});
|
|
22
|
+
}
|
package/interaction/DragPan.js
CHANGED
|
@@ -15,10 +15,8 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
import OLDragPan from 'ol/interaction/DragPan.js';
|
|
18
|
-
import {createElement
|
|
18
|
+
import {createElement} from 'react';
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
return createElement('interaction', {cls: OLDragPan,
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export default DragPan;
|
|
20
|
+
export default function DragPan(props) {
|
|
21
|
+
return createElement('interaction', {cls: OLDragPan, ...props});
|
|
22
|
+
}
|
|
@@ -15,10 +15,8 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
import OLDragRotate from 'ol/interaction/DragRotate.js';
|
|
18
|
-
import {createElement
|
|
18
|
+
import {createElement} from 'react';
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
return createElement('interaction', {cls: OLDragRotate,
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export default DragRotate;
|
|
20
|
+
export default function DragRotate(props) {
|
|
21
|
+
return createElement('interaction', {cls: OLDragRotate, ...props});
|
|
22
|
+
}
|
|
@@ -15,14 +15,8 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
import OLDragRotateAndZoom from 'ol/interaction/DragRotateAndZoom.js';
|
|
18
|
-
import {createElement
|
|
18
|
+
import {createElement} from 'react';
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
return createElement('interaction', {
|
|
22
|
-
|
|
23
|
-
ref,
|
|
24
|
-
...props,
|
|
25
|
-
});
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
export default DragRotateAndZoom;
|
|
20
|
+
export default function DragRotateAndZoom(props) {
|
|
21
|
+
return createElement('interaction', {cls: OLDragRotateAndZoom, ...props});
|
|
22
|
+
}
|
package/interaction/DragZoom.js
CHANGED
|
@@ -15,10 +15,8 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
import OLDragZoom from 'ol/interaction/DragZoom.js';
|
|
18
|
-
import {createElement
|
|
18
|
+
import {createElement} from 'react';
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
return createElement('interaction', {cls: OLDragZoom,
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export default DragZoom;
|
|
20
|
+
export default function DragZoom(props) {
|
|
21
|
+
return createElement('interaction', {cls: OLDragZoom, ...props});
|
|
22
|
+
}
|
package/interaction/Draw.js
CHANGED
|
@@ -15,10 +15,8 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
import OLDraw from 'ol/interaction/Draw.js';
|
|
18
|
-
import {createElement
|
|
18
|
+
import {createElement} from 'react';
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
return createElement('interaction', {cls: OLDraw,
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export default Draw;
|
|
20
|
+
export default function Draw(props) {
|
|
21
|
+
return createElement('interaction', {cls: OLDraw, ...props});
|
|
22
|
+
}
|
package/interaction/Extent.js
CHANGED
|
@@ -15,10 +15,8 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
import OLExtent from 'ol/interaction/Extent.js';
|
|
18
|
-
import {createElement
|
|
18
|
+
import {createElement} from 'react';
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
return createElement('interaction', {cls: OLExtent,
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export default Extent;
|
|
20
|
+
export default function Extent(props) {
|
|
21
|
+
return createElement('interaction', {cls: OLExtent, ...props});
|
|
22
|
+
}
|
|
@@ -15,10 +15,8 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
import OLInteraction from 'ol/interaction/Interaction.js';
|
|
18
|
-
import {createElement
|
|
18
|
+
import {createElement} from 'react';
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
return createElement('interaction', {cls: OLInteraction,
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export default Interaction;
|
|
20
|
+
export default function Interaction(props) {
|
|
21
|
+
return createElement('interaction', {cls: OLInteraction, ...props});
|
|
22
|
+
}
|
|
@@ -15,10 +15,8 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
import OLKeyboardPan from 'ol/interaction/KeyboardPan.js';
|
|
18
|
-
import {createElement
|
|
18
|
+
import {createElement} from 'react';
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
return createElement('interaction', {cls: OLKeyboardPan,
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export default KeyboardPan;
|
|
20
|
+
export default function KeyboardPan(props) {
|
|
21
|
+
return createElement('interaction', {cls: OLKeyboardPan, ...props});
|
|
22
|
+
}
|
|
@@ -15,10 +15,8 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
import OLKeyboardZoom from 'ol/interaction/KeyboardZoom.js';
|
|
18
|
-
import {createElement
|
|
18
|
+
import {createElement} from 'react';
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
return createElement('interaction', {cls: OLKeyboardZoom,
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export default KeyboardZoom;
|
|
20
|
+
export default function KeyboardZoom(props) {
|
|
21
|
+
return createElement('interaction', {cls: OLKeyboardZoom, ...props});
|
|
22
|
+
}
|
package/interaction/Link.js
CHANGED
|
@@ -15,10 +15,8 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
import OLLink from 'ol/interaction/Link.js';
|
|
18
|
-
import {createElement
|
|
18
|
+
import {createElement} from 'react';
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
return createElement('interaction', {cls: OLLink,
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export default Link;
|
|
20
|
+
export default function Link(props) {
|
|
21
|
+
return createElement('interaction', {cls: OLLink, ...props});
|
|
22
|
+
}
|
package/interaction/Modify.js
CHANGED
|
@@ -15,10 +15,8 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
import OLModify from 'ol/interaction/Modify.js';
|
|
18
|
-
import {createElement
|
|
18
|
+
import {createElement} from 'react';
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
return createElement('interaction', {cls: OLModify,
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export default Modify;
|
|
20
|
+
export default function Modify(props) {
|
|
21
|
+
return createElement('interaction', {cls: OLModify, ...props});
|
|
22
|
+
}
|
|
@@ -15,10 +15,8 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
import OLMouseWheelZoom from 'ol/interaction/MouseWheelZoom.js';
|
|
18
|
-
import {createElement
|
|
18
|
+
import {createElement} from 'react';
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
return createElement('interaction', {cls: OLMouseWheelZoom,
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export default MouseWheelZoom;
|
|
20
|
+
export default function MouseWheelZoom(props) {
|
|
21
|
+
return createElement('interaction', {cls: OLMouseWheelZoom, ...props});
|
|
22
|
+
}
|
|
@@ -15,10 +15,8 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
import OLPinchRotate from 'ol/interaction/PinchRotate.js';
|
|
18
|
-
import {createElement
|
|
18
|
+
import {createElement} from 'react';
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
return createElement('interaction', {cls: OLPinchRotate,
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export default PinchRotate;
|
|
20
|
+
export default function PinchRotate(props) {
|
|
21
|
+
return createElement('interaction', {cls: OLPinchRotate, ...props});
|
|
22
|
+
}
|
package/interaction/PinchZoom.js
CHANGED
|
@@ -15,10 +15,8 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
import OLPinchZoom from 'ol/interaction/PinchZoom.js';
|
|
18
|
-
import {createElement
|
|
18
|
+
import {createElement} from 'react';
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
return createElement('interaction', {cls: OLPinchZoom,
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export default PinchZoom;
|
|
20
|
+
export default function PinchZoom(props) {
|
|
21
|
+
return createElement('interaction', {cls: OLPinchZoom, ...props});
|
|
22
|
+
}
|
package/interaction/Pointer.js
CHANGED
|
@@ -15,10 +15,8 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
import OLPointer from 'ol/interaction/Pointer.js';
|
|
18
|
-
import {createElement
|
|
18
|
+
import {createElement} from 'react';
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
return createElement('interaction', {cls: OLPointer,
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export default Pointer;
|
|
20
|
+
export default function Pointer(props) {
|
|
21
|
+
return createElement('interaction', {cls: OLPointer, ...props});
|
|
22
|
+
}
|
package/interaction/Property.js
CHANGED
|
@@ -15,10 +15,8 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
import OLProperty from 'ol/interaction/Property.js';
|
|
18
|
-
import {createElement
|
|
18
|
+
import {createElement} from 'react';
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
return createElement('interaction', {cls: OLProperty,
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export default Property;
|
|
20
|
+
export default function Property(props) {
|
|
21
|
+
return createElement('interaction', {cls: OLProperty, ...props});
|
|
22
|
+
}
|
package/interaction/Select.js
CHANGED
|
@@ -15,10 +15,8 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
import OLSelect from 'ol/interaction/Select.js';
|
|
18
|
-
import {createElement
|
|
18
|
+
import {createElement} from 'react';
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
return createElement('interaction', {cls: OLSelect,
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export default Select;
|
|
20
|
+
export default function Select(props) {
|
|
21
|
+
return createElement('interaction', {cls: OLSelect, ...props});
|
|
22
|
+
}
|