react-spatial 1.2.0 → 1.2.3-beta.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/LayerService.js +128 -184
- package/LayerService.js.map +7 -1
- package/Projections.js +29 -12
- package/Projections.js.map +7 -1
- package/components/BaseLayerSwitcher/BaseLayerSwitcher.js +163 -221
- package/components/BaseLayerSwitcher/BaseLayerSwitcher.js.map +7 -1
- package/components/BaseLayerSwitcher/index.js +1 -3
- package/components/BaseLayerSwitcher/index.js.map +7 -1
- package/components/BasicMap/BasicMap.js +147 -285
- package/components/BasicMap/BasicMap.js.map +7 -1
- package/components/BasicMap/index.js +1 -3
- package/components/BasicMap/index.js.map +7 -1
- package/components/CanvasSaveButton/CanvasSaveButton.js +165 -419
- package/components/CanvasSaveButton/CanvasSaveButton.js.map +7 -1
- package/components/CanvasSaveButton/index.js +1 -3
- package/components/CanvasSaveButton/index.js.map +7 -1
- package/components/Copyright/Copyright.js +29 -70
- package/components/Copyright/Copyright.js.map +7 -1
- package/components/Copyright/index.js +1 -3
- package/components/Copyright/index.js.map +7 -1
- package/components/FeatureExportButton/FeatureExportButton.js +40 -106
- package/components/FeatureExportButton/FeatureExportButton.js.map +7 -1
- package/components/FeatureExportButton/index.js +1 -3
- package/components/FeatureExportButton/index.js.map +7 -1
- package/components/FilterButton/FilterButton.js +41 -106
- package/components/FilterButton/FilterButton.js.map +7 -1
- package/components/FilterButton/index.js +1 -3
- package/components/FilterButton/index.js.map +7 -1
- package/components/FitExtent/FitExtent.js +17 -50
- package/components/FitExtent/FitExtent.js.map +7 -1
- package/components/FitExtent/index.js +1 -3
- package/components/FitExtent/index.js.map +7 -1
- package/components/FollowButton/FollowButton.js +41 -111
- package/components/FollowButton/FollowButton.js.map +7 -1
- package/components/FollowButton/index.js +1 -3
- package/components/FollowButton/index.js.map +7 -1
- package/components/Geolocation/Geolocation.js +104 -213
- package/components/Geolocation/Geolocation.js.map +7 -1
- package/components/Geolocation/index.js +1 -3
- package/components/Geolocation/index.js.map +7 -1
- package/components/LayerTree/LayerTree.js +207 -397
- package/components/LayerTree/LayerTree.js.map +7 -1
- package/components/LayerTree/index.js +1 -3
- package/components/LayerTree/index.js.map +7 -1
- package/components/MousePosition/MousePosition.js +61 -130
- package/components/MousePosition/MousePosition.js.map +7 -1
- package/components/MousePosition/index.js +1 -3
- package/components/MousePosition/index.js.map +7 -1
- package/components/NorthArrow/NorthArrow.js +22 -62
- package/components/NorthArrow/NorthArrow.js.map +7 -1
- package/components/NorthArrow/index.js +1 -3
- package/components/NorthArrow/index.js.map +7 -1
- package/components/Overlay/Overlay.js +85 -132
- package/components/Overlay/Overlay.js.map +7 -1
- package/components/Overlay/index.js +1 -3
- package/components/Overlay/index.js.map +7 -1
- package/components/Permalink/Permalink.js +151 -231
- package/components/Permalink/Permalink.js.map +7 -1
- package/components/Permalink/index.js +1 -3
- package/components/Permalink/index.js.map +7 -1
- package/components/Popup/Popup.js +106 -233
- package/components/Popup/Popup.js.map +7 -1
- package/components/Popup/index.js +1 -3
- package/components/Popup/index.js.map +7 -1
- package/components/ResizeHandler/ResizeHandler.js +60 -115
- package/components/ResizeHandler/ResizeHandler.js.map +7 -1
- package/components/ResizeHandler/index.js +1 -3
- package/components/ResizeHandler/index.js.map +7 -1
- package/components/RouteSchedule/RouteSchedule.js +153 -285
- package/components/RouteSchedule/RouteSchedule.js.map +7 -1
- package/components/RouteSchedule/index.js +1 -3
- package/components/RouteSchedule/index.js.map +7 -1
- package/components/ScaleLine/ScaleLine.js +21 -45
- package/components/ScaleLine/ScaleLine.js.map +7 -1
- package/components/ScaleLine/index.js +1 -3
- package/components/ScaleLine/index.js.map +7 -1
- package/components/Search/Search.js +122 -186
- package/components/Search/Search.js.map +7 -1
- package/components/Search/SearchService.js +45 -69
- package/components/Search/SearchService.js.map +7 -1
- package/components/Search/engines/Engine.js +18 -25
- package/components/Search/engines/Engine.js.map +7 -1
- package/components/Search/engines/StopFinder.js +21 -38
- package/components/Search/engines/StopFinder.js.map +7 -1
- package/components/Search/index.js +3 -6
- package/components/Search/index.js.map +7 -1
- package/components/StopsFinder/StopsFinder.js +123 -174
- package/components/StopsFinder/StopsFinder.js.map +7 -1
- package/components/StopsFinder/StopsFinderOption.js +37 -54
- package/components/StopsFinder/StopsFinderOption.js.map +7 -1
- package/components/StopsFinder/index.js +1 -3
- package/components/StopsFinder/index.js.map +7 -1
- package/components/TrackerControl/TrackerControl.js +73 -128
- package/components/TrackerControl/TrackerControl.js.map +7 -1
- package/components/TrackerControl/index.js +1 -3
- package/components/TrackerControl/index.js.map +7 -1
- package/components/Zoom/Zoom.js +69 -112
- package/components/Zoom/Zoom.js.map +7 -1
- package/components/Zoom/index.js +1 -3
- package/components/Zoom/index.js.map +7 -1
- package/package.json +20 -15
- package/propTypes.js +17 -23
- package/propTypes.js.map +7 -1
- package/setupTests.js +2 -4
- package/setupTests.js.map +7 -1
- package/themes/default/components.scss +0 -1
- package/themes/default/examples.scss +0 -1
- package/utils/GlobalsForOle.js +63 -64
- package/utils/GlobalsForOle.js.map +7 -1
- package/utils/KML.js +178 -364
- package/utils/KML.js.map +7 -1
- package/utils/KMLFormat.js +37 -73
- package/utils/KMLFormat.js.map +7 -1
- package/utils/Styles.js +24 -32
- package/utils/Styles.js.map +7 -1
- package/utils/getPolygonPattern.js +11 -44
- package/utils/getPolygonPattern.js.map +7 -1
- package/utils/timeUtils.js +16 -35
- package/utils/timeUtils.js.map +7 -1
- package/LayerService.test.js +0 -160
- package/LayerService.test.js.map +0 -1
- package/components/BaseLayerSwitcher/BaseLayerSwitcher.test.js +0 -88
- package/components/BaseLayerSwitcher/BaseLayerSwitcher.test.js.map +0 -1
- package/components/BaseLayerToggler/BaseLayerToggler.js +0 -490
- package/components/BaseLayerToggler/BaseLayerToggler.js.map +0 -1
- package/components/BaseLayerToggler/BaseLayerToggler.md.scss +0 -9
- package/components/BaseLayerToggler/BaseLayerToggler.scss +0 -49
- package/components/BaseLayerToggler/BaseLayerToggler.test.js +0 -127
- package/components/BaseLayerToggler/BaseLayerToggler.test.js.map +0 -1
- package/components/BaseLayerToggler/index.js +0 -3
- package/components/BaseLayerToggler/index.js.map +0 -1
- package/components/BasicMap/BasicMap.test.js +0 -288
- package/components/BasicMap/BasicMap.test.js.map +0 -1
- package/components/CanvasSaveButton/CanvasSaveButton.test.js +0 -173
- package/components/CanvasSaveButton/CanvasSaveButton.test.js.map +0 -1
- package/components/Copyright/Copyright.test.js +0 -133
- package/components/Copyright/Copyright.test.js.map +0 -1
- package/components/FeatureExportButton/FeatureExportButton.test.js +0 -407
- package/components/FeatureExportButton/FeatureExportButton.test.js.map +0 -1
- package/components/FilterButton/FilterButton.test.js +0 -48
- package/components/FilterButton/FilterButton.test.js.map +0 -1
- package/components/FitExtent/FitExtent.test.js +0 -44
- package/components/FitExtent/FitExtent.test.js.map +0 -1
- package/components/FollowButton/FollowButton.test.js +0 -57
- package/components/FollowButton/FollowButton.test.js.map +0 -1
- package/components/Geolocation/Geolocation.test.js +0 -263
- package/components/Geolocation/Geolocation.test.js.map +0 -1
- package/components/LayerTree/LayerTree.test.js +0 -323
- package/components/LayerTree/LayerTree.test.js.map +0 -1
- package/components/MousePosition/MousePosition.test.js +0 -125
- package/components/MousePosition/MousePosition.test.js.map +0 -1
- package/components/NorthArrow/NorthArrow.test.js +0 -106
- package/components/NorthArrow/NorthArrow.test.js.map +0 -1
- package/components/Overlay/Overlay.test.js +0 -145
- package/components/Overlay/Overlay.test.js.map +0 -1
- package/components/Permalink/Permalink.test.js +0 -267
- package/components/Permalink/Permalink.test.js.map +0 -1
- package/components/Popup/Popup.test.js +0 -291
- package/components/Popup/Popup.test.js.map +0 -1
- package/components/ResizeHandler/ResizeHandler.test.js +0 -410
- package/components/ResizeHandler/ResizeHandler.test.js.map +0 -1
- package/components/RouteSchedule/RouteSchedule.test.js +0 -102
- package/components/RouteSchedule/RouteSchedule.test.js.map +0 -1
- package/components/ScaleLine/ScaleLine.test.js +0 -32
- package/components/ScaleLine/ScaleLine.test.js.map +0 -1
- package/components/Search/Search.test.js +0 -15
- package/components/Search/Search.test.js.map +0 -1
- package/components/StopsFinder/StopsFinder.test.js +0 -19
- package/components/StopsFinder/StopsFinder.test.js.map +0 -1
- package/components/TrackerControl/TrackerControl.test.js +0 -17
- package/components/TrackerControl/TrackerControl.test.js.map +0 -1
- package/components/Zoom/Zoom.test.js +0 -150
- package/components/Zoom/Zoom.test.js.map +0 -1
- package/styleguidist/ComponentsList.js +0 -52
- package/styleguidist/ComponentsList.js.map +0 -1
- package/styleguidist/StyleGuide.js +0 -253
- package/styleguidist/StyleGuide.js.map +0 -1
- package/utils/KML.test.js +0 -163
- package/utils/KML.test.js.map +0 -1
- package/utils/KMLFormat.test.js +0 -22
- package/utils/KMLFormat.test.js.map +0 -1
- package/utils/getPolygonPattern.test.js +0 -66
- package/utils/getPolygonPattern.test.js.map +0 -1
- package/utils/timeUtils.test.js +0 -32
- package/utils/timeUtils.test.js.map +0 -1
package/utils/GlobalsForOle.js
CHANGED
|
@@ -1,95 +1,94 @@
|
|
|
1
|
-
import OLVectorLayer from
|
|
2
|
-
import VectorSource from
|
|
3
|
-
import Control from
|
|
4
|
-
import Draw from
|
|
5
|
-
import Snap from
|
|
6
|
-
import Pointer from
|
|
7
|
-
import Select from
|
|
8
|
-
import Modify from
|
|
9
|
-
import Style from
|
|
10
|
-
import Fill from
|
|
11
|
-
import Stroke from
|
|
12
|
-
import Circle from
|
|
13
|
-
import Icon from
|
|
14
|
-
import RegularShape from
|
|
15
|
-
import Collection from
|
|
16
|
-
import Feature from
|
|
17
|
-
import Observable, { unByKey } from
|
|
18
|
-
import { getCenter } from
|
|
1
|
+
import OLVectorLayer from "ol/layer/Vector";
|
|
2
|
+
import VectorSource from "ol/source/Vector";
|
|
3
|
+
import Control from "ol/control/Control";
|
|
4
|
+
import Draw from "ol/interaction/Draw";
|
|
5
|
+
import Snap from "ol/interaction/Snap";
|
|
6
|
+
import Pointer from "ol/interaction/Pointer";
|
|
7
|
+
import Select from "ol/interaction/Select";
|
|
8
|
+
import Modify from "ol/interaction/Modify";
|
|
9
|
+
import Style from "ol/style/Style";
|
|
10
|
+
import Fill from "ol/style/Fill";
|
|
11
|
+
import Stroke from "ol/style/Stroke";
|
|
12
|
+
import Circle from "ol/style/Circle";
|
|
13
|
+
import Icon from "ol/style/Icon";
|
|
14
|
+
import RegularShape from "ol/style/RegularShape";
|
|
15
|
+
import Collection from "ol/Collection";
|
|
16
|
+
import Feature from "ol/Feature";
|
|
17
|
+
import Observable, { unByKey } from "ol/Observable";
|
|
18
|
+
import { getCenter } from "ol/extent";
|
|
19
19
|
import {
|
|
20
20
|
Point,
|
|
21
21
|
LineString,
|
|
22
22
|
Polygon,
|
|
23
23
|
MultiPoint,
|
|
24
24
|
MultiLineString,
|
|
25
|
-
MultiPolygon
|
|
26
|
-
} from
|
|
27
|
-
import LinearRing from
|
|
28
|
-
import { fromExtent } from
|
|
29
|
-
import * as events from
|
|
30
|
-
import * as condition from
|
|
31
|
-
import { OL3Parser } from
|
|
32
|
-
import { BufferOp } from
|
|
33
|
-
import { OverlayOp } from
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* This module create window.ol and window.jsts variables for ole editor.
|
|
37
|
-
*/
|
|
25
|
+
MultiPolygon
|
|
26
|
+
} from "ol/geom";
|
|
27
|
+
import LinearRing from "ol/geom/LinearRing";
|
|
28
|
+
import { fromExtent } from "ol/geom/Polygon";
|
|
29
|
+
import * as events from "ol/events";
|
|
30
|
+
import * as condition from "ol/events/condition";
|
|
31
|
+
import { OL3Parser } from "jsts/org/locationtech/jts/io";
|
|
32
|
+
import { BufferOp } from "jsts/org/locationtech/jts/operation/buffer";
|
|
33
|
+
import { OverlayOp } from "jsts/org/locationtech/jts/operation/overlay";
|
|
38
34
|
if (!window.ol) {
|
|
39
35
|
window.ol = {
|
|
40
|
-
Feature
|
|
41
|
-
Collection
|
|
36
|
+
Feature,
|
|
37
|
+
Collection,
|
|
42
38
|
layer: {
|
|
43
|
-
Vector: OLVectorLayer
|
|
39
|
+
Vector: OLVectorLayer
|
|
44
40
|
},
|
|
45
41
|
source: {
|
|
46
|
-
Vector: VectorSource
|
|
42
|
+
Vector: VectorSource
|
|
47
43
|
},
|
|
48
44
|
interaction: {
|
|
49
|
-
Draw
|
|
50
|
-
Snap
|
|
51
|
-
Pointer
|
|
52
|
-
Select
|
|
53
|
-
Modify
|
|
45
|
+
Draw,
|
|
46
|
+
Snap,
|
|
47
|
+
Pointer,
|
|
48
|
+
Select,
|
|
49
|
+
Modify
|
|
54
50
|
},
|
|
55
51
|
control: {
|
|
56
|
-
Control
|
|
52
|
+
Control
|
|
57
53
|
},
|
|
58
54
|
style: {
|
|
59
|
-
Style
|
|
60
|
-
Fill
|
|
61
|
-
Stroke
|
|
62
|
-
Circle
|
|
63
|
-
RegularShape
|
|
64
|
-
Icon
|
|
55
|
+
Style,
|
|
56
|
+
Fill,
|
|
57
|
+
Stroke,
|
|
58
|
+
Circle,
|
|
59
|
+
RegularShape,
|
|
60
|
+
Icon
|
|
65
61
|
},
|
|
66
62
|
geom: {
|
|
67
|
-
Point
|
|
68
|
-
LineString
|
|
69
|
-
Polygon
|
|
70
|
-
MultiPoint
|
|
71
|
-
MultiLineString
|
|
72
|
-
MultiPolygon
|
|
73
|
-
LinearRing
|
|
63
|
+
Point,
|
|
64
|
+
LineString,
|
|
65
|
+
Polygon,
|
|
66
|
+
MultiPoint,
|
|
67
|
+
MultiLineString,
|
|
68
|
+
MultiPolygon,
|
|
69
|
+
LinearRing
|
|
74
70
|
},
|
|
75
71
|
extent: {
|
|
76
|
-
getCenter
|
|
72
|
+
getCenter
|
|
77
73
|
},
|
|
78
|
-
Observable:
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
74
|
+
Observable: {
|
|
75
|
+
...Observable,
|
|
76
|
+
unByKey
|
|
77
|
+
},
|
|
78
|
+
events: {
|
|
79
|
+
...events,
|
|
80
|
+
condition: {
|
|
81
|
+
...condition
|
|
82
|
+
}
|
|
83
|
+
}
|
|
82
84
|
};
|
|
83
85
|
window.ol.geom.Polygon.fromExtent = fromExtent;
|
|
84
86
|
}
|
|
85
|
-
|
|
86
87
|
if (!window.jsts) {
|
|
87
88
|
window.jsts = {
|
|
88
89
|
io: {
|
|
89
|
-
OL3Parser
|
|
90
|
+
OL3Parser
|
|
90
91
|
},
|
|
91
|
-
operation: { buffer: { BufferOp
|
|
92
|
+
operation: { buffer: { BufferOp }, overlay: { OverlayOp } }
|
|
92
93
|
};
|
|
93
94
|
}
|
|
94
|
-
|
|
95
|
-
//# sourceMappingURL=GlobalsForOle.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/utils/GlobalsForOle.js"],
|
|
4
|
+
"sourcesContent": ["import OLVectorLayer from 'ol/layer/Vector';\nimport VectorSource from 'ol/source/Vector';\nimport Control from 'ol/control/Control';\nimport Draw from 'ol/interaction/Draw';\nimport Snap from 'ol/interaction/Snap';\nimport Pointer from 'ol/interaction/Pointer';\nimport Select from 'ol/interaction/Select';\nimport Modify from 'ol/interaction/Modify';\nimport Style from 'ol/style/Style';\nimport Fill from 'ol/style/Fill';\nimport Stroke from 'ol/style/Stroke';\nimport Circle from 'ol/style/Circle';\nimport Icon from 'ol/style/Icon';\nimport RegularShape from 'ol/style/RegularShape';\nimport Collection from 'ol/Collection';\nimport Feature from 'ol/Feature';\nimport Observable, { unByKey } from 'ol/Observable';\nimport { getCenter } from 'ol/extent';\nimport {\n Point,\n LineString,\n Polygon,\n MultiPoint,\n MultiLineString,\n MultiPolygon,\n} from 'ol/geom';\nimport LinearRing from 'ol/geom/LinearRing';\nimport { fromExtent } from 'ol/geom/Polygon';\nimport * as events from 'ol/events';\nimport * as condition from 'ol/events/condition';\nimport { OL3Parser } from 'jsts/org/locationtech/jts/io';\nimport { BufferOp } from 'jsts/org/locationtech/jts/operation/buffer';\nimport { OverlayOp } from 'jsts/org/locationtech/jts/operation/overlay';\n\n/**\n * This module create window.ol and window.jsts variables for ole editor.\n */\nif (!window.ol) {\n window.ol = {\n Feature,\n Collection,\n layer: {\n Vector: OLVectorLayer,\n },\n source: {\n Vector: VectorSource,\n },\n interaction: {\n Draw,\n Snap,\n Pointer,\n Select,\n Modify,\n },\n control: {\n Control,\n },\n style: {\n Style,\n Fill,\n Stroke,\n Circle,\n RegularShape,\n Icon,\n },\n geom: {\n Point,\n LineString,\n Polygon,\n MultiPoint,\n MultiLineString,\n MultiPolygon,\n LinearRing,\n },\n extent: {\n getCenter,\n },\n Observable: {\n ...Observable,\n unByKey,\n },\n events: {\n ...events,\n condition: {\n ...condition,\n },\n },\n };\n window.ol.geom.Polygon.fromExtent = fromExtent;\n}\n\nif (!window.jsts) {\n window.jsts = {\n io: {\n OL3Parser,\n },\n operation: { buffer: { BufferOp }, overlay: { OverlayOp } },\n };\n}\n"],
|
|
5
|
+
"mappings": "AAAA,OAAO,mBAAmB;AAC1B,OAAO,kBAAkB;AACzB,OAAO,aAAa;AACpB,OAAO,UAAU;AACjB,OAAO,UAAU;AACjB,OAAO,aAAa;AACpB,OAAO,YAAY;AACnB,OAAO,YAAY;AACnB,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,YAAY;AACnB,OAAO,YAAY;AACnB,OAAO,UAAU;AACjB,OAAO,kBAAkB;AACzB,OAAO,gBAAgB;AACvB,OAAO,aAAa;AACpB,OAAO,cAAc,eAAe;AACpC,SAAS,iBAAiB;AAC1B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,OAAO,gBAAgB;AACvB,SAAS,kBAAkB;AAC3B,YAAY,YAAY;AACxB,YAAY,eAAe;AAC3B,SAAS,iBAAiB;AAC1B,SAAS,gBAAgB;AACzB,SAAS,iBAAiB;AAK1B,IAAI,CAAC,OAAO,IAAI;AACd,SAAO,KAAK;AAAA,IACV;AAAA,IACA;AAAA,IACA,OAAO;AAAA,MACL,QAAQ;AAAA,IACV;AAAA,IACA,QAAQ;AAAA,MACN,QAAQ;AAAA,IACV;AAAA,IACA,aAAa;AAAA,MACX;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,SAAS;AAAA,MACP;AAAA,IACF;AAAA,IACA,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,MAAM;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,QAAQ;AAAA,MACN;AAAA,IACF;AAAA,IACA,YAAY;AAAA,MACV,GAAG;AAAA,MACH;AAAA,IACF;AAAA,IACA,QAAQ;AAAA,MACN,GAAG;AAAA,MACH,WAAW;AAAA,QACT,GAAG;AAAA,MACL;AAAA,IACF;AAAA,EACF;AACA,SAAO,GAAG,KAAK,QAAQ,aAAa;AACtC;AAEA,IAAI,CAAC,OAAO,MAAM;AAChB,SAAO,OAAO;AAAA,IACZ,IAAI;AAAA,MACF;AAAA,IACF;AAAA,IACA,WAAW,EAAE,QAAQ,EAAE,SAAS,GAAG,SAAS,EAAE,UAAU,EAAE;AAAA,EAC5D;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|