mobility-toolbox-js 2.0.0-beta.3 → 2.0.0-beta.33
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/README.md +4 -1
- package/api/RealtimeAPI.d.ts +268 -0
- package/api/RealtimeAPI.d.ts.map +1 -0
- package/api/RoutingAPI.d.ts +33 -0
- package/api/RoutingAPI.d.ts.map +1 -0
- package/api/StopsAPI.d.ts +36 -0
- package/api/StopsAPI.d.ts.map +1 -0
- package/api/index.d.ts +5 -0
- package/api/index.d.ts.map +1 -0
- package/api/typedefs.d.ts +105 -0
- package/api/typedefs.d.ts.map +1 -0
- package/common/api/HttpAPI.d.ts +31 -0
- package/common/api/HttpAPI.d.ts.map +1 -0
- package/common/api/WebSocketAPI.d.ts +95 -0
- package/common/api/WebSocketAPI.d.ts.map +1 -0
- package/common/controls/Control.d.ts +74 -0
- package/common/controls/Control.d.ts.map +1 -0
- package/common/index.d.ts +3 -0
- package/common/index.d.ts.map +1 -0
- package/common/layers/Layer.d.ts +80 -0
- package/common/layers/Layer.d.ts.map +1 -0
- package/common/mixins/CopyrightMixin.d.ts +22 -0
- package/common/mixins/CopyrightMixin.d.ts.map +1 -0
- package/common/mixins/MapboxLayerMixin.d.ts +27 -0
- package/common/mixins/MapboxLayerMixin.d.ts.map +1 -0
- package/common/mixins/RealtimeLayerMixin.d.ts +58 -0
- package/common/mixins/RealtimeLayerMixin.d.ts.map +1 -0
- package/common/mixins/StopFinderMixin.d.ts +40 -0
- package/common/mixins/StopFinderMixin.d.ts.map +1 -0
- package/common/mixins/UserInteractionsLayerMixin.d.ts +42 -0
- package/common/mixins/UserInteractionsLayerMixin.d.ts.map +1 -0
- package/common/styles/index.d.ts +5 -0
- package/common/styles/index.d.ts.map +1 -0
- package/common/styles/realtimeDefaultStyle.d.ts +15 -0
- package/common/styles/realtimeDefaultStyle.d.ts.map +1 -0
- package/common/styles/{trackerDelayStyle.js → realtimeDelayStyle.d.ts} +3 -9
- package/common/styles/realtimeDelayStyle.d.ts.map +1 -0
- package/common/styles/realtimeSimpleStyle.d.ts +3 -0
- package/common/styles/realtimeSimpleStyle.d.ts.map +1 -0
- package/common/typedefs.d.ts +50 -0
- package/common/typedefs.d.ts.map +1 -0
- package/common/utils/cleanStopTime.d.ts +7 -0
- package/common/utils/cleanStopTime.d.ts.map +1 -0
- package/common/utils/compareDepartures.d.ts +9 -0
- package/common/utils/compareDepartures.d.ts.map +1 -0
- package/common/utils/createCanvas.d.ts +9 -0
- package/common/utils/createCanvas.d.ts.map +1 -0
- package/common/utils/createTrackerFilters.d.ts +12 -0
- package/common/utils/createTrackerFilters.d.ts.map +1 -0
- package/common/utils/getLayersAsFlatArray.d.ts +3 -0
- package/common/utils/getLayersAsFlatArray.d.ts.map +1 -0
- package/common/utils/getMapboxMapCopyrights.d.ts +8 -0
- package/common/utils/getMapboxMapCopyrights.d.ts.map +1 -0
- package/common/utils/getMapboxRender.d.ts +5 -0
- package/common/utils/getMapboxRender.d.ts.map +1 -0
- package/common/utils/getMaplibreRender.d.ts +5 -0
- package/common/utils/getMaplibreRender.d.ts.map +1 -0
- package/common/utils/getRealtimeModeSuffix.d.ts +8 -0
- package/common/utils/getRealtimeModeSuffix.d.ts.map +1 -0
- package/common/utils/getUrlWithParams.d.ts +9 -0
- package/common/utils/getUrlWithParams.d.ts.map +1 -0
- package/common/utils/getVehiclePosition.d.ts +14 -0
- package/common/utils/getVehiclePosition.d.ts.map +1 -0
- package/common/utils/index.d.ts +12 -0
- package/common/utils/index.d.ts.map +1 -0
- package/common/utils/removeDuplicate.d.ts +10 -0
- package/common/utils/removeDuplicate.d.ts.map +1 -0
- package/common/utils/renderTrajectories.d.ts +20 -0
- package/common/utils/renderTrajectories.d.ts.map +1 -0
- package/common/utils/sortByDelay.d.ts +3 -0
- package/common/utils/sortByDelay.d.ts.map +1 -0
- package/common/utils/timeUtils.d.ts +5 -0
- package/common/utils/timeUtils.d.ts.map +1 -0
- package/common/utils/trackerConfig.d.ts +24 -0
- package/common/utils/trackerConfig.d.ts.map +1 -0
- package/iife.d.ts +3 -0
- package/iife.d.ts.map +1 -0
- package/index.d.ts +6 -0
- package/index.d.ts.map +1 -0
- package/mapbox/controls/CopyrightControl.d.ts +32 -0
- package/mapbox/controls/CopyrightControl.d.ts.map +1 -0
- package/mapbox/controls/index.d.ts +2 -0
- package/mapbox/controls/index.d.ts.map +1 -0
- package/mapbox/index.d.ts +5 -0
- package/mapbox/index.d.ts.map +1 -0
- package/mapbox/layers/Layer.d.ts +47 -0
- package/mapbox/layers/Layer.d.ts.map +1 -0
- package/mapbox/layers/RealtimeLayer.d.ts +118 -0
- package/mapbox/layers/RealtimeLayer.d.ts.map +1 -0
- package/mapbox/layers/index.d.ts +3 -0
- package/mapbox/layers/index.d.ts.map +1 -0
- package/mapbox/utils.d.ts +8 -0
- package/mapbox/utils.d.ts.map +1 -0
- package/mbt.js +50042 -0
- package/mbt.js.map +7 -0
- package/mbt.min.js +1008 -0
- package/mbt.min.js.map +7 -0
- package/ol/controls/CopyrightControl.d.ts +31 -0
- package/ol/controls/CopyrightControl.d.ts.map +1 -0
- package/ol/controls/RoutingControl.d.ts +180 -0
- package/ol/controls/RoutingControl.d.ts.map +1 -0
- package/ol/controls/StopFinderControl.d.ts +32 -0
- package/ol/controls/StopFinderControl.d.ts.map +1 -0
- package/ol/controls/index.d.ts +4 -0
- package/ol/controls/index.d.ts.map +1 -0
- package/ol/index.d.ts +6 -0
- package/ol/index.d.ts.map +1 -0
- package/ol/layers/Layer.d.ts +49 -0
- package/ol/layers/Layer.d.ts.map +1 -0
- package/ol/layers/MapboxLayer.d.ts +42 -0
- package/ol/layers/MapboxLayer.d.ts.map +1 -0
- package/ol/layers/MapboxStyleLayer.d.ts +146 -0
- package/ol/layers/MapboxStyleLayer.d.ts.map +1 -0
- package/ol/layers/MaplibreLayer.d.ts +27 -0
- package/ol/layers/MaplibreLayer.d.ts.map +1 -0
- package/ol/layers/RealtimeLayer.d.ts +119 -0
- package/ol/layers/RealtimeLayer.d.ts.map +1 -0
- package/ol/layers/RoutingLayer.d.ts +24 -0
- package/ol/layers/RoutingLayer.d.ts.map +1 -0
- package/ol/layers/VectorLayer.d.ts +23 -0
- package/ol/layers/VectorLayer.d.ts.map +1 -0
- package/ol/layers/WMSLayer.d.ts +38 -0
- package/ol/layers/WMSLayer.d.ts.map +1 -0
- package/ol/layers/index.d.ts +9 -0
- package/ol/layers/index.d.ts.map +1 -0
- package/ol/styles/fullTrajectoryDelayStyle.d.ts +4 -0
- package/ol/styles/fullTrajectoryDelayStyle.d.ts.map +1 -0
- package/ol/styles/fullTrajectoryStyle.d.ts +4 -0
- package/ol/styles/fullTrajectoryStyle.d.ts.map +1 -0
- package/ol/styles/index.d.ts +3 -0
- package/ol/styles/index.d.ts.map +1 -0
- package/package.json +56 -95
- package/setupTests.d.ts +2 -0
- package/setupTests.d.ts.map +1 -0
- package/types/index.d.ts +10 -0
- package/types/realtime.d.ts +24 -0
- package/types/routing.d.ts +206 -0
- package/types/stops.d.ts +143 -0
- package/api/index.js +0 -3
- package/api/routing/RoutingAPI.js +0 -44
- package/api/routing/RoutingAPI.test.js +0 -41
- package/api/stops/StopsAPI.js +0 -41
- package/api/stops/StopsAPI.test.js +0 -34
- package/api/tralis/TralisAPI.js +0 -731
- package/api/tralis/TralisAPI.test.js +0 -75
- package/api/tralis/TralisAPIUtils.js +0 -73
- package/api/tralis/WebSocketConnector.js +0 -338
- package/api/tralis/WebSocketConnector.test.js +0 -356
- package/api/tralis/typedefs.js +0 -81
- package/common/Tracker.js +0 -197
- package/common/api/api.js +0 -64
- package/common/api/api.test.js +0 -68
- package/common/controls/Control.js +0 -146
- package/common/controls/Control.test.js +0 -98
- package/common/layers/Layer.js +0 -404
- package/common/layers/Layer.test.js +0 -585
- package/common/mixins/CopyrightMixin.js +0 -48
- package/common/mixins/SearchMixin.js +0 -176
- package/common/mixins/TralisLayerMixin.js +0 -930
- package/common/styles/index.js +0 -4
- package/common/styles/trackerDefaultStyle.js +0 -333
- package/common/styles/trackerSimpleStyle.js +0 -22
- package/common/trackerConfig.js +0 -190
- package/common/trackerConfig.test.js +0 -25
- package/common/typedefs.js +0 -23
- package/common/utils/createTrackerFilters.js +0 -87
- package/common/utils/createTrackerFilters.test.js +0 -95
- package/common/utils/getMapboxMapCopyrights.js +0 -32
- package/common/utils/getMapboxMapCopyrights.test.js +0 -47
- package/common/utils/getMapboxStyleUrl.js +0 -32
- package/common/utils/getVehiclePosition.js +0 -72
- package/common/utils/index.js +0 -6
- package/common/utils/removeDuplicate.js +0 -22
- package/common/utils/removeDuplicate.test.js +0 -22
- package/common/utils/sortByDelay.js +0 -23
- package/common/utils/timeUtils.js +0 -44
- package/common/utils/timeUtils.test.js +0 -16
- package/index.js +0 -2
- package/index.js.map +0 -1
- package/mapbox/controls/CopyrightControl.js +0 -58
- package/mapbox/index.js +0 -3
- package/mapbox/layers/Layer.js +0 -118
- package/mapbox/layers/Layer.test.js +0 -202
- package/mapbox/layers/TralisLayer.js +0 -329
- package/mapbox/layers/TralisLayer.test.js +0 -40
- package/mapbox/utils.js +0 -46
- package/module.js +0 -23
- package/ol/README.md +0 -0
- package/ol/controls/CopyrightControl.js +0 -80
- package/ol/controls/CopyrightControl.test.js +0 -211
- package/ol/controls/RoutingControl.js +0 -752
- package/ol/controls/RoutingControl.test.js +0 -216
- package/ol/controls/StopFinderControl.js +0 -38
- package/ol/controls/StopFinderControl.test.js +0 -59
- package/ol/controls/snapshots/RoutingControlRouteGen10.json +0 -58
- package/ol/controls/snapshots/RoutingControlRouteGen100.json +0 -292
- package/ol/controls/snapshots/RoutingControlRouteGen30.json +0 -69
- package/ol/controls/snapshots/RoutingControlRouteGen5.json +0 -58
- package/ol/controls/snapshots/RoutingControlRouteOSM.json +0 -759
- package/ol/controls/snapshots/RoutingControlStation1.json +0 -60
- package/ol/controls/snapshots/RoutingControlStation2.json +0 -49
- package/ol/index.js +0 -13
- package/ol/layers/Layer.js +0 -193
- package/ol/layers/Layer.test.js +0 -197
- package/ol/layers/MapboxLayer.js +0 -378
- package/ol/layers/MapboxLayer.test.js +0 -186
- package/ol/layers/MapboxStyleLayer.js +0 -417
- package/ol/layers/MapboxStyleLayer.test.js +0 -262
- package/ol/layers/MaplibreLayer.js +0 -280
- package/ol/layers/RoutingLayer.js +0 -91
- package/ol/layers/RoutingLayer.test.js +0 -49
- package/ol/layers/TralisLayer.js +0 -359
- package/ol/layers/TralisLayer.test.js +0 -97
- package/ol/layers/VectorLayer.js +0 -43
- package/ol/layers/VectorLayer.test.js +0 -98
- package/ol/layers/WMSLayer.js +0 -80
- package/ol/layers/WMSLayer.test.js +0 -84
- package/ol/styles/fullTrajectoryDelayStyle.js +0 -35
- package/ol/styles/fullTrajectoryStyle.js +0 -51
- package/ol/styles/index.js +0 -2
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export default CopyrightControl;
|
|
2
|
+
/**
|
|
3
|
+
* Display layer's copyrights.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* import { Map } from 'ol';
|
|
7
|
+
* import { CopyrightControl } from 'mobility-toolbox-js/ol';
|
|
8
|
+
*
|
|
9
|
+
* const map = new Map({
|
|
10
|
+
* target: 'map',
|
|
11
|
+
* });
|
|
12
|
+
* const control = new CopyrightControl();
|
|
13
|
+
* control.attachToMap(map)
|
|
14
|
+
*
|
|
15
|
+
*
|
|
16
|
+
* @see <a href="/example/ol-copyright">Openlayers copyright example</a>
|
|
17
|
+
*
|
|
18
|
+
* @extends {Control}
|
|
19
|
+
* @implements {CopyrightInterface}
|
|
20
|
+
*/
|
|
21
|
+
declare class CopyrightControl extends Control implements CopyrightInterface {
|
|
22
|
+
constructor(options: any);
|
|
23
|
+
onPostRender(evt: any): void;
|
|
24
|
+
getCopyrights(): any[];
|
|
25
|
+
/**
|
|
26
|
+
* @ignore
|
|
27
|
+
*/
|
|
28
|
+
frameState: any;
|
|
29
|
+
}
|
|
30
|
+
import Control from "../../common/controls/Control";
|
|
31
|
+
//# sourceMappingURL=CopyrightControl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CopyrightControl.d.ts","sourceRoot":"","sources":["../../../src/ol/controls/CopyrightControl.js"],"names":[],"mappings":";AAKA;;;;;;;;;;;;;;;;;;GAkBG;AACH,0DAFgB,kBAAkB;IAGhC,0BAGC;IAwCD,6BAQC;IA9CD,uBAsBC;IAkBG;;OAEG;IACH,gBAAgC;CAIrC"}
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
export default RoutingControl;
|
|
2
|
+
/**
|
|
3
|
+
* Display a route of a specified mean of transport.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* import { Map } from 'ol';
|
|
7
|
+
* import { RoutingControl } from 'mobility-toolbox-js/ol';
|
|
8
|
+
*
|
|
9
|
+
* const map = new Map({
|
|
10
|
+
* target: 'map'
|
|
11
|
+
* });
|
|
12
|
+
*
|
|
13
|
+
* const control = new RoutingControl();
|
|
14
|
+
*
|
|
15
|
+
* control.attachToMap(map)
|
|
16
|
+
*
|
|
17
|
+
* @classproperty {string} apiKey - Key used for RoutingApi requests.
|
|
18
|
+
* @classproperty {string} stopsApiKey - Key used for Stop lookup requests (defaults to apiKey).
|
|
19
|
+
* @classproperty {string} stopsApiUrl - Url used for Stop lookup requests (defaults to https://api.geops.io/stops/v1/lookup/).
|
|
20
|
+
* @classproperty {Array.<Array<graph="osm", minZoom=0, maxZoom=99>>} graphs - Array of routing graphs and min/max zoom levels. If you use the control in combination with the [geOps Maps API](https://developer.geops.io/apis/maps/), you may want to use the optimal level of generalizations: "[['gen4', 0, 8], ['gen3', 8, 9], ['gen2', 9, 11], ['gen1', 11, 13], ['osm', 13, 99]]"
|
|
21
|
+
* @classproperty {string} mot - Mean of transport to be used for routing.
|
|
22
|
+
* @classproperty {object} routingApiParams - object of additional parameters to pass to the routing api request.
|
|
23
|
+
* @classproperty {object} snapToClosestStation - If true, the routing will snap the coordinate to the closest station. Default to false.
|
|
24
|
+
* @classproperty {boolean} useRawViaPoints - Experimental property. Wen true, it allows the user to add via points using different kind of string. See "via" parameter defined by the [geOps Routing API](https://developer.geops.io/apis/routing/). Default to false, only array of coordinates and station's id are supported as via points.
|
|
25
|
+
* @classproperty {RoutingLayer|Layer} routingLayer - Layer for adding route features.
|
|
26
|
+
* @classproperty {function} onRouteError - Callback on error.
|
|
27
|
+
* @classproperty {boolean} loading - True if the control is requesting the backend.
|
|
28
|
+
* @see <a href="/example/ol-routing">Openlayers routing example</a>
|
|
29
|
+
*
|
|
30
|
+
* @extends {Control}
|
|
31
|
+
* @implements {RoutingInterface}
|
|
32
|
+
*/
|
|
33
|
+
declare class RoutingControl extends Control implements RoutingInterface {
|
|
34
|
+
/**
|
|
35
|
+
* Calculate at which resolutions corresponds each generalizations.
|
|
36
|
+
*
|
|
37
|
+
* @private
|
|
38
|
+
*/
|
|
39
|
+
private static getGraphsResolutions;
|
|
40
|
+
constructor(options?: {});
|
|
41
|
+
/** True if the control is requesting the backend. */
|
|
42
|
+
loading: boolean;
|
|
43
|
+
/** @ignore */
|
|
44
|
+
graphs: any;
|
|
45
|
+
/** @ignore */
|
|
46
|
+
mot: any;
|
|
47
|
+
/** @ignore */
|
|
48
|
+
modify: boolean;
|
|
49
|
+
/** @ignore */
|
|
50
|
+
routingApiParams: any;
|
|
51
|
+
/** @ignore */
|
|
52
|
+
useRawViaPoints: any;
|
|
53
|
+
/** @ignore */
|
|
54
|
+
snapToClosestStation: any;
|
|
55
|
+
/** @ignore */
|
|
56
|
+
cacheStationData: {};
|
|
57
|
+
/** @ignore */
|
|
58
|
+
abortControllers: any[];
|
|
59
|
+
/** @ignore */
|
|
60
|
+
apiKey: any;
|
|
61
|
+
/** @ignore */
|
|
62
|
+
stopsApiKey: any;
|
|
63
|
+
/** @ignore */
|
|
64
|
+
segments: any[];
|
|
65
|
+
/** @ignore */
|
|
66
|
+
stopsApiUrl: any;
|
|
67
|
+
/** @ignore */
|
|
68
|
+
api: RoutingAPI;
|
|
69
|
+
/** @ignore */
|
|
70
|
+
routingLayer: any;
|
|
71
|
+
/** @ignore */
|
|
72
|
+
onRouteError: any;
|
|
73
|
+
/** @ignore */
|
|
74
|
+
viaPoints: any[];
|
|
75
|
+
/**
|
|
76
|
+
* Used on click on map while control is active:
|
|
77
|
+
* By default adds a viaPoint to the end of array.
|
|
78
|
+
* If an existing viaPoint is clicked removes the clicked viaPoint.
|
|
79
|
+
* @private
|
|
80
|
+
*/
|
|
81
|
+
private onMapClick;
|
|
82
|
+
/**
|
|
83
|
+
* Used on end of the modify interaction. Resolves feature modification:
|
|
84
|
+
* Line drag creates new viaPoint at the final coordinate of drag.
|
|
85
|
+
* Point drag replaces old viaPoint.
|
|
86
|
+
* @private
|
|
87
|
+
*/
|
|
88
|
+
private onModifyEnd;
|
|
89
|
+
/**
|
|
90
|
+
* Used on start of the modify interaction. Stores relevant data
|
|
91
|
+
* in this.initialRouteDrag object
|
|
92
|
+
* @private
|
|
93
|
+
*/
|
|
94
|
+
private onModifyStart;
|
|
95
|
+
/** @ignore */
|
|
96
|
+
apiChangeListener: () => Promise<any>;
|
|
97
|
+
/**
|
|
98
|
+
* Adds/Replaces a viaPoint to the viaPoints array and redraws route:
|
|
99
|
+
* Adds a viaPoint at end of array by default.
|
|
100
|
+
* If an index is passed a viaPoint is added at the specified index.
|
|
101
|
+
* If an index is passed and overwrite x is > 0, x viaPoints at the specified
|
|
102
|
+
* index are replaced with a single new viaPoint.
|
|
103
|
+
* @param {number[]|string} coordinates Array of coordinates
|
|
104
|
+
* @param {number} [index=-1] Integer representing the index of the added viaPoint. If not specified, the viaPoint is added at the end of the array.
|
|
105
|
+
* @param {number} [overwrite=0] Marks the number of viaPoints that are removed at the specified index on add.
|
|
106
|
+
*/
|
|
107
|
+
addViaPoint(coordinatesOrString: any, index?: number, overwrite?: number): void;
|
|
108
|
+
/**
|
|
109
|
+
* Removes a viaPoint at the passed array index and redraws route
|
|
110
|
+
* By default the last viaPoint is removed.
|
|
111
|
+
* @param {number} index Integer representing the index of the viaPoint to delete.
|
|
112
|
+
*/
|
|
113
|
+
removeViaPoint(index?: number): void;
|
|
114
|
+
/**
|
|
115
|
+
* Replaces the current viaPoints with a new coordinate array.
|
|
116
|
+
* @param {Array<Array<number>>} coordinateArray Array of nested coordinates
|
|
117
|
+
*/
|
|
118
|
+
setViaPoints(coordinateArray: Array<Array<number>>): void;
|
|
119
|
+
/**
|
|
120
|
+
* Removes all viaPoints, clears the source and triggers a change event
|
|
121
|
+
*/
|
|
122
|
+
reset(): void;
|
|
123
|
+
/**
|
|
124
|
+
* Aborts viapoint and route requests
|
|
125
|
+
* @private
|
|
126
|
+
*/
|
|
127
|
+
private abortRequests;
|
|
128
|
+
/**
|
|
129
|
+
* Draws route on map using an array of coordinates:
|
|
130
|
+
* If a single coordinate is passed a single point feature is added to map.
|
|
131
|
+
* If two or more coordinates are passed a request to the RoutingAPI fetches
|
|
132
|
+
* the route using the passed coordinates and the current mot.
|
|
133
|
+
* @private
|
|
134
|
+
*/
|
|
135
|
+
private drawRoute;
|
|
136
|
+
/**
|
|
137
|
+
* Draw a via point. This function can parse all the possibilitiies
|
|
138
|
+
*
|
|
139
|
+
* @private
|
|
140
|
+
*/
|
|
141
|
+
private drawViaPoint;
|
|
142
|
+
/** @ignore */
|
|
143
|
+
initialRouteDrag: {
|
|
144
|
+
viaPoint: any;
|
|
145
|
+
oldRoute: any;
|
|
146
|
+
segmentIndex: number;
|
|
147
|
+
};
|
|
148
|
+
/** @ignore */
|
|
149
|
+
element: HTMLButtonElement;
|
|
150
|
+
/**
|
|
151
|
+
* Create the interaction used to modify vertexes of features.
|
|
152
|
+
* @private
|
|
153
|
+
*/
|
|
154
|
+
private createModifyInteraction;
|
|
155
|
+
/**
|
|
156
|
+
* @type {ol.interaction.Modify}
|
|
157
|
+
* @private
|
|
158
|
+
*/
|
|
159
|
+
private modifyInteraction;
|
|
160
|
+
/**
|
|
161
|
+
* Add click listener to map.
|
|
162
|
+
* @private
|
|
163
|
+
*/
|
|
164
|
+
private addListeners;
|
|
165
|
+
/** @ignore */
|
|
166
|
+
onMapClickKey: any;
|
|
167
|
+
/**
|
|
168
|
+
* Remove click listener from map.
|
|
169
|
+
* @private
|
|
170
|
+
*/
|
|
171
|
+
private removeListeners;
|
|
172
|
+
/** @ignore */
|
|
173
|
+
format: GeoJSON;
|
|
174
|
+
/** @ignore */
|
|
175
|
+
graphsResolutions: any;
|
|
176
|
+
}
|
|
177
|
+
import Control from "../../common/controls/Control";
|
|
178
|
+
import { RoutingAPI } from "../../api";
|
|
179
|
+
import { GeoJSON } from "ol/format";
|
|
180
|
+
//# sourceMappingURL=RoutingControl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RoutingControl.d.ts","sourceRoot":"","sources":["../../../src/ol/controls/RoutingControl.js"],"names":[],"mappings":";AAiDA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wDAFgB,gBAAgB;IAoH9B;;;;OAIG;IACH,oCAMC;IA5HD,0BA+GC;IAlFC,qDAAqD;IACrD,iBAAoB;IAEpB,cAAc;IACd,YAAgD;IAEhD,cAAc;IACd,SAA+B;IAE/B,cAAc;IACd,gBAAsC;IAEtC,cAAc;IACd,sBAAsD;IAEtD,cAAc;IACd,qBAAuD;IAEvD,cAAc;IACd,0BAAiE;IAEjE,cAAc;IACd,qBAA0B;IAE1B,cAAc;IACd,wBAA0B;IAE1B,cAAc;IACd,YAA4B;IAE5B,cAAc;IACd,iBAAqD;IAErD,cAAc;IACd,gBAAkB;IAElB,cAAc;IACd,iBAA0E;IAE1E,cAAc;IACd,gBAEE;IAEF,cAAc;IACd,kBAKI;IAEJ,cAAc;IACd,kBAUI;IAEJ,cAAc;IACd,iBAAmB;IAoXrB;;;;;OAKG;IACH,mBAeC;IA4CD;;;;;OAKG;IACH,oBAqBC;IArED;;;;OAIG;IACH,sBAmCC;IAxaC,cAAc;IACd,sCAA+C;IAmBjD;;;;;;;;;OASG;IACH,8CAHW,MAAM,cACN,MAAM,QAchB;IAED;;;;OAIG;IACH,uBAFW,MAAM,QAYhB;IAED;;;OAGG;IACH,8BAFW,MAAM,MAAM,MAAM,CAAC,CAAC,QAS9B;IAED;;OAEG;IACH,cASC;IAED;;;OAGG;IACH,sBAeC;IAED;;;;;;OAMG;IACH,kBA0HC;IAED;;;;OAIG;IACH,qBAkHC;IA2DC,cAAc;IACd;;;;MAIC;IAsCD,cAAc;IACd,2BAA+C;IAYjD;;;OAGG;IACH,gCA8BC;IA7BC;;;OAGG;IAEH,0BAoBE;IAMJ;;;OAGG;IACH,qBAOC;IAFC,cAAc;IACd,mBAAgE;IAGlE;;;OAGG;IACH,wBAEC;IAKG,cAAc;IACd,gBAEE;IAEF,cAAc;IACd,uBAGC;CA2BN"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export default StopFinderControl;
|
|
2
|
+
/**
|
|
3
|
+
* Search stations.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* import { Map } from 'ol';
|
|
7
|
+
* import { StopFinderControl } from 'mobility-toolbox-js/ol';
|
|
8
|
+
*
|
|
9
|
+
* const map = new Map({
|
|
10
|
+
* target: 'map',
|
|
11
|
+
* });
|
|
12
|
+
*
|
|
13
|
+
* const control = new StopFinderControl({
|
|
14
|
+
* apiKey: [yourApiKey]
|
|
15
|
+
* });
|
|
16
|
+
*
|
|
17
|
+
* control.attachToMap(map);
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
* @see <a href="/example/ol-search">Openlayers search example</a>
|
|
21
|
+
*
|
|
22
|
+
* @extends {Control}
|
|
23
|
+
* @implements {StopFinderInterface}
|
|
24
|
+
*/
|
|
25
|
+
declare class StopFinderControl extends Control implements StopFinderInterface {
|
|
26
|
+
/**
|
|
27
|
+
* @private
|
|
28
|
+
*/
|
|
29
|
+
private onSuggestionClick;
|
|
30
|
+
}
|
|
31
|
+
import Control from "../../common/controls/Control";
|
|
32
|
+
//# sourceMappingURL=StopFinderControl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StopFinderControl.d.ts","sourceRoot":"","sources":["../../../src/ol/controls/StopFinderControl.js"],"names":[],"mappings":";AAIA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,2DAFgB,mBAAmB;IAGjC;;OAEG;IACH,0BAGC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ol/controls/index.js"],"names":[],"mappings":""}
|
package/ol/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ol/index.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export default Layer;
|
|
2
|
+
/**
|
|
3
|
+
* A class representing a layer to display on an OpenLayers map.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* import { Layer } from 'mobility-toolbox-js/ol';
|
|
7
|
+
*
|
|
8
|
+
* const layer = new Layer({
|
|
9
|
+
* olLayer: ...,
|
|
10
|
+
* });
|
|
11
|
+
*
|
|
12
|
+
* @see <a href="/example/ol-map">Map example</a>
|
|
13
|
+
*
|
|
14
|
+
* @classproperty {ol/Map~Map} map - The map where the layer is displayed.
|
|
15
|
+
* @extends {Layer}
|
|
16
|
+
*/
|
|
17
|
+
declare class Layer {
|
|
18
|
+
/**
|
|
19
|
+
* Define layer's properties.
|
|
20
|
+
*
|
|
21
|
+
* @ignore
|
|
22
|
+
*/
|
|
23
|
+
defineProperties(options: any): void;
|
|
24
|
+
/**
|
|
25
|
+
* Initialize the layer and listen to feature clicks.
|
|
26
|
+
* @param {ol/Map~Map} map
|
|
27
|
+
*/
|
|
28
|
+
attachToMap(map: any): void;
|
|
29
|
+
/**
|
|
30
|
+
* Terminate what was initialized in init function. Remove layer, events...
|
|
31
|
+
*/
|
|
32
|
+
detachFromMap(): void;
|
|
33
|
+
activateUserInteractions(): void;
|
|
34
|
+
singleClickListenerKey: any;
|
|
35
|
+
pointerMoveListenerKey: any;
|
|
36
|
+
deactivateUserInteractions(): void;
|
|
37
|
+
/**
|
|
38
|
+
* Toggle listeners needed when a layer is avisible or not.
|
|
39
|
+
* @private
|
|
40
|
+
*/
|
|
41
|
+
private toggleVisibleListeners;
|
|
42
|
+
/**
|
|
43
|
+
* Create a copy of the Layer.
|
|
44
|
+
* @param {Object} newOptions Options to override
|
|
45
|
+
* @return {Layer} A Layer
|
|
46
|
+
*/
|
|
47
|
+
clone(newOptions: any): Layer;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=Layer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Layer.d.ts","sourceRoot":"","sources":["../../../src/ol/layers/Layer.js"],"names":[],"mappings":";AAIA;;;;;;;;;;;;;;GAcG;AACH;IAqBE;;;;OAIG;IACH,qCAQC;IAED;;;OAGG;IACH,4BAiDC;IAED;;OAEG;IACH,sBAYC;IAED,iCAyBC;IAjBG,4BAGC;IASD,4BAGC;IAIL,mCAEC;IAED;;;OAGG;IACH,+BAMC;IAED;;;;OAIG;IACH,wBAFY,KAAK,CAIhB;CACF"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A class representing Mapboxlayer to display on BasicMap
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* import { MapboxLayer } from 'mobility-toolbox-js/ol';
|
|
6
|
+
*
|
|
7
|
+
* const layer = new MapboxLayer({
|
|
8
|
+
* url: 'https://maps.geops.io/styles/travic_v2/style.json',
|
|
9
|
+
* apikey: 'yourApiKey',
|
|
10
|
+
* });
|
|
11
|
+
*
|
|
12
|
+
* @classproperty {ol/Map~Map} map - The map where the layer is displayed.
|
|
13
|
+
* @extends {Layer}
|
|
14
|
+
*/
|
|
15
|
+
export default class MapboxLayer extends Layer {
|
|
16
|
+
/**
|
|
17
|
+
* Create the mapbox map.
|
|
18
|
+
* @private
|
|
19
|
+
*/
|
|
20
|
+
private loadMbMap;
|
|
21
|
+
/** @ignore */
|
|
22
|
+
renderState: {
|
|
23
|
+
center: any[];
|
|
24
|
+
zoom: any;
|
|
25
|
+
rotation: any;
|
|
26
|
+
visible: any;
|
|
27
|
+
opacity: any;
|
|
28
|
+
size: number[];
|
|
29
|
+
};
|
|
30
|
+
/** @ignore */
|
|
31
|
+
copyrights: any[];
|
|
32
|
+
getOlLayerRender(): (frameState: any) => any;
|
|
33
|
+
getMapboxMapClass(): any;
|
|
34
|
+
/**
|
|
35
|
+
* Create a copy of the MapboxLayer.
|
|
36
|
+
* @param {Object} newOptions Options to override
|
|
37
|
+
* @return {MapboxLayer} A MapboxLayer
|
|
38
|
+
*/
|
|
39
|
+
clone(newOptions: any): MapboxLayer;
|
|
40
|
+
}
|
|
41
|
+
import Layer from "./Layer";
|
|
42
|
+
//# sourceMappingURL=MapboxLayer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MapboxLayer.d.ts","sourceRoot":"","sources":["../../../src/ol/layers/MapboxLayer.js"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;GAaG;AACH;IA2BE;;;OAGG;IACH,kBA0CC;IA/BC,cAAc;IACd;;;;;;;MAOC;IAOC,cAAc;IACd,kBAA0D;IAiB9D,6CAEC;IAGD,yBAEC;IAED;;;;OAIG;IACH,wBAFY,WAAW,CAItB;CACF"}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
export default MapboxStyleLayer;
|
|
2
|
+
/**
|
|
3
|
+
* Layer for visualizing a specific set of layer from a MapboxLayer.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* import { MapboxLayer, MapboxStyleLayer } from 'mobility-toolbox-js/ol';
|
|
7
|
+
*
|
|
8
|
+
* const mapboxLayer = new MapboxLayer({
|
|
9
|
+
* url: 'https://maps.geops.io/styles/travic_v2/style.json?key=[yourApiKey]',
|
|
10
|
+
* });
|
|
11
|
+
*
|
|
12
|
+
* const layer = new MapboxStyleLayer({
|
|
13
|
+
* mapboxLayer: mapboxLayer,
|
|
14
|
+
* styleLayersFilter: () => {},
|
|
15
|
+
* });
|
|
16
|
+
*
|
|
17
|
+
* @classproperty {ol/Map~Map} map - The map where the layer is displayed.
|
|
18
|
+
* @extends {Layer}
|
|
19
|
+
*/
|
|
20
|
+
declare class MapboxStyleLayer extends Layer {
|
|
21
|
+
/**
|
|
22
|
+
* Constructor.
|
|
23
|
+
*
|
|
24
|
+
* @param {Object} options
|
|
25
|
+
* @param {MapboxLayer} [options.mapboxLayer] The MapboxLayer to use.
|
|
26
|
+
* @param {Function} [options.styleLayersFilter] Filter function to decide which style layer to display.
|
|
27
|
+
*/
|
|
28
|
+
constructor(options?: {
|
|
29
|
+
mapboxLayer?: MapboxLayer;
|
|
30
|
+
styleLayersFilter?: Function;
|
|
31
|
+
});
|
|
32
|
+
/**
|
|
33
|
+
* MapboxLayer provided for the style Layer.
|
|
34
|
+
* @type {MapboxLayer}
|
|
35
|
+
* @private
|
|
36
|
+
*/
|
|
37
|
+
private mapboxLayer;
|
|
38
|
+
/**
|
|
39
|
+
* Define if the layer has data to display in the current mapbox layer.
|
|
40
|
+
*/
|
|
41
|
+
disabled: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Function to filter features to be displayed.
|
|
44
|
+
* @type {function}
|
|
45
|
+
* @private
|
|
46
|
+
*/
|
|
47
|
+
private styleLayersFilter;
|
|
48
|
+
/**
|
|
49
|
+
* Mapbox style layer id where to add the style layers.
|
|
50
|
+
* See [mapbox.map.addLayer](https://docs.mapbox.com/mapbox-gl-js/api/map/#map#addlayer) documentation.
|
|
51
|
+
* @type {String}
|
|
52
|
+
* @private
|
|
53
|
+
*/
|
|
54
|
+
private beforeId;
|
|
55
|
+
/**
|
|
56
|
+
* Function to filter features for getFeatureInfoAtCoordinate method.
|
|
57
|
+
* @type {function}
|
|
58
|
+
* @private
|
|
59
|
+
*/
|
|
60
|
+
private featureInfoFilter;
|
|
61
|
+
/**
|
|
62
|
+
* Function to query the rendered features.
|
|
63
|
+
* @type {function}
|
|
64
|
+
* @private
|
|
65
|
+
*/
|
|
66
|
+
private queryRenderedLayersFilter;
|
|
67
|
+
/**
|
|
68
|
+
* Array of features to highlight.
|
|
69
|
+
* @type {Array<ol/Feature~Feature>}
|
|
70
|
+
* @private
|
|
71
|
+
*/
|
|
72
|
+
private highlightedFeatures;
|
|
73
|
+
/**
|
|
74
|
+
* Array of selected features.
|
|
75
|
+
* @type {Array<ol/Feature~Feature>}
|
|
76
|
+
* @private
|
|
77
|
+
*/
|
|
78
|
+
private selectedFeatures;
|
|
79
|
+
/**
|
|
80
|
+
* Array of mapbox style layers to add.
|
|
81
|
+
* @type {Array<mapboxgl.styleLayer>}
|
|
82
|
+
* @private
|
|
83
|
+
*/
|
|
84
|
+
private styleLayers;
|
|
85
|
+
/** @ignore */
|
|
86
|
+
addStyleLayers(): void;
|
|
87
|
+
/**
|
|
88
|
+
* On Mapbox map load callback function. Add style layers and dynaimc filters.
|
|
89
|
+
* @ignore
|
|
90
|
+
*/
|
|
91
|
+
onLoad(): void;
|
|
92
|
+
/** @private */
|
|
93
|
+
private addDynamicFilters;
|
|
94
|
+
/**
|
|
95
|
+
* Terminate the layer.
|
|
96
|
+
* @param {mapboxgl.Map} map the mapbox map.
|
|
97
|
+
* @override
|
|
98
|
+
*/
|
|
99
|
+
override detachFromMap(map: mapboxgl.Map): void;
|
|
100
|
+
/** @ignore */
|
|
101
|
+
removeStyleLayers(): void;
|
|
102
|
+
/**
|
|
103
|
+
* Request feature information for a given coordinate.
|
|
104
|
+
* @param {ol/coordinate~Coordinate} coordinate Coordinate to request the information at.
|
|
105
|
+
* @return {Promise<FeatureInfo>} Promise with features, layer and coordinate.
|
|
106
|
+
*/
|
|
107
|
+
getFeatureInfoAtCoordinate(coordinate: any): Promise<FeatureInfo>;
|
|
108
|
+
/**
|
|
109
|
+
* Set filter that determines which features should be rendered in a style layer.
|
|
110
|
+
* @param {mapboxgl.filter} filter Determines which features should be rendered in a style layer.
|
|
111
|
+
*/
|
|
112
|
+
setFilter(filter: mapboxgl.filter): void;
|
|
113
|
+
/**
|
|
114
|
+
* Set if features are hovered or not.
|
|
115
|
+
* @param {Array<ol/Feature~Feature>} features
|
|
116
|
+
* @param {boolean} state Is the feature hovered
|
|
117
|
+
* @private
|
|
118
|
+
*/
|
|
119
|
+
private setHoverState;
|
|
120
|
+
/**
|
|
121
|
+
* Select a list of features.
|
|
122
|
+
* @param {Array<ol/Feature~Feature>} [features=[]] Features to select.
|
|
123
|
+
* @private
|
|
124
|
+
*/
|
|
125
|
+
private select;
|
|
126
|
+
/**
|
|
127
|
+
* Highlight a list of features.
|
|
128
|
+
* @param {Array<ol/Feature~Feature>} [features=[]] Features to highlight.
|
|
129
|
+
* @private
|
|
130
|
+
*/
|
|
131
|
+
private highlight;
|
|
132
|
+
/**
|
|
133
|
+
* Apply visibility to style layers that fits the styleLayersFilter function.
|
|
134
|
+
* @param {Event} evt Layer's event that has called the function.
|
|
135
|
+
* @private
|
|
136
|
+
*/
|
|
137
|
+
private applyLayoutVisibility;
|
|
138
|
+
/**
|
|
139
|
+
* Create a copy of the MapboxStyleLayer.
|
|
140
|
+
* @param {Object} newOptions Options to override.
|
|
141
|
+
* @return {MapboxStyleLayer} A MapboxStyleLayer.
|
|
142
|
+
*/
|
|
143
|
+
clone(newOptions: any): MapboxStyleLayer;
|
|
144
|
+
}
|
|
145
|
+
import Layer from "./Layer";
|
|
146
|
+
//# sourceMappingURL=MapboxStyleLayer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MapboxStyleLayer.d.ts","sourceRoot":"","sources":["../../../src/ol/layers/MapboxStyleLayer.js"],"names":[],"mappings":";AAGA;;;;;;;;;;;;;;;;;GAiBG;AACH;IACE;;;;;;OAMG;IACH;QAHiC,WAAW;QACd,iBAAiB;OA4F9C;IAvFC;;;;OAIG;IACH,oBAAsC;IAEtC;;OAEG;IACH,kBAAqB;IAErB;;;;OAIG;IACH,0BAAkD;IAElD;;;;;OAKG;IACH,iBAAgC;IAEhC;;;;OAIG;IACH,0BAAoE;IAEpE;;;;OAIG;IACH,kCAAkE;IAElE;;;;OAIG;IACH,4BAA6B;IAE7B;;;;OAIG;IACH,yBAA0B;IAE1B;;;;OAIG;IACH,oBACyE;IAiG3E,cAAc;IACd,uBAcC;IAiBD;;;OAGG;IACH,eAaC;IAtIG,eAAe;IACf,0BAMC;IAgEL;;;;OAIG;IACH,gDAOC;IAmBD,cAAc;IACd,0BAYC;IAqBD;;;;OAIG;IACH,6CAFY,QAAQ,WAAW,CAAC,CAiC/B;IAED;;;OAGG;IACH,yCAYC;IAED;;;;;OAKG;IACH,sBA8BC;IAED;;;;OAIG;IACH,eAIC;IAED;;;;OAIG;IACH,kBAeC;IAED;;;;OAIG;IAEH,8BA8BC;IAED;;;;OAIG;IACH,wBAFY,gBAAgB,CAI3B;CACF"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A class representing MaplibreLayer to display on BasicMap
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* import { MaplibreLayer } from 'mobility-toolbox-js/ol';
|
|
6
|
+
*
|
|
7
|
+
* const layer = new MaplibreLayer({
|
|
8
|
+
* url: 'https://maps.geops.io/styles/travic_v2/style.json',
|
|
9
|
+
* apikey: 'yourApiKey',
|
|
10
|
+
* });
|
|
11
|
+
*
|
|
12
|
+
* @classproperty {ol/Map~Map} map - The map where the layer is displayed.
|
|
13
|
+
* @extends {Layer}
|
|
14
|
+
*/
|
|
15
|
+
export default class MaplibreLayer extends Layer {
|
|
16
|
+
getOlLayerRender(): (frameState: any) => any;
|
|
17
|
+
getMapboxMapClass(): typeof Map;
|
|
18
|
+
/**
|
|
19
|
+
* Create a copy of the MapboxLayer.
|
|
20
|
+
* @param {Object} newOptions Options to override
|
|
21
|
+
* @return {MapboxLayer} A MapboxLayer
|
|
22
|
+
*/
|
|
23
|
+
clone(newOptions: any): MapboxLayer;
|
|
24
|
+
}
|
|
25
|
+
import Layer from "./Layer";
|
|
26
|
+
import { Map } from "maplibre-gl";
|
|
27
|
+
//# sourceMappingURL=MaplibreLayer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MaplibreLayer.d.ts","sourceRoot":"","sources":["../../../src/ol/layers/MaplibreLayer.js"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;GAaG;AACH;IACE,6CAEC;IAGD,gCAEC;IAED;;;;OAIG;IACH,oCAEC;CACF"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
export default RealtimeLayer;
|
|
2
|
+
/**
|
|
3
|
+
* Responsible for loading and display data from a Realtime service.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* import { RealtimeLayer } from 'mobility-toolbox-js/ol';
|
|
7
|
+
*
|
|
8
|
+
* const layer = new RealtimeLayer({
|
|
9
|
+
* url: [yourUrl],
|
|
10
|
+
* apiKey: [yourApiKey],
|
|
11
|
+
* });
|
|
12
|
+
*
|
|
13
|
+
*
|
|
14
|
+
* @see <a href="/api/class/src/api/RealtimeAPI%20js~RealtimeAPI%20html">RealtimeAPI</a>
|
|
15
|
+
*
|
|
16
|
+
* @extends {Layer}
|
|
17
|
+
* @implements {UserInteractionsLayerInterface}
|
|
18
|
+
* @implements {RealtimeLayerInterface}
|
|
19
|
+
*/
|
|
20
|
+
declare class RealtimeLayer extends Layer implements UserInteractionsLayerInterface, RealtimeLayerInterface {
|
|
21
|
+
/**
|
|
22
|
+
* Constructor.
|
|
23
|
+
*
|
|
24
|
+
* @param {Object} options
|
|
25
|
+
* @private
|
|
26
|
+
*/
|
|
27
|
+
private constructor();
|
|
28
|
+
/** @ignore */
|
|
29
|
+
olLayer: any;
|
|
30
|
+
container: HTMLDivElement;
|
|
31
|
+
transformContainer: HTMLDivElement;
|
|
32
|
+
vectorLayer: any;
|
|
33
|
+
/** @ignore */
|
|
34
|
+
renderState: {
|
|
35
|
+
center: number[];
|
|
36
|
+
zoom: any;
|
|
37
|
+
rotation: number;
|
|
38
|
+
};
|
|
39
|
+
attachToMap(map: any): void;
|
|
40
|
+
currentZoom: any;
|
|
41
|
+
/**
|
|
42
|
+
* Detect in the canvas if there is data to query at a specific coordinate.
|
|
43
|
+
* @param {ol/coordinate~Coordinate} coordinate The coordinate to test
|
|
44
|
+
* @returns
|
|
45
|
+
*/
|
|
46
|
+
hasFeatureInfoAtCoordinate(coordinate: any): boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Render the trajectories using current map's size, resolution and rotation.
|
|
49
|
+
* @param {boolean} noInterpolate if true, renders the vehicles without interpolating theirs positions.
|
|
50
|
+
* @overrides
|
|
51
|
+
*/
|
|
52
|
+
renderTrajectories(noInterpolate: boolean): void;
|
|
53
|
+
/**
|
|
54
|
+
* Launch renderTrajectories. it avoids duplicating code in renderTrajectories methhod.
|
|
55
|
+
* @private
|
|
56
|
+
* @override
|
|
57
|
+
*/
|
|
58
|
+
private override renderTrajectoriesInternal;
|
|
59
|
+
renderedViewState: any;
|
|
60
|
+
/**
|
|
61
|
+
* Return the delay in ms before the next rendering.
|
|
62
|
+
*/
|
|
63
|
+
getRefreshTimeInMs(): any;
|
|
64
|
+
getFeatureInfoAtCoordinate(coordinate: any, options?: {}): any;
|
|
65
|
+
/**
|
|
66
|
+
* On move end we update the websocket with the new bbox.
|
|
67
|
+
*
|
|
68
|
+
* @private
|
|
69
|
+
* @override
|
|
70
|
+
*/
|
|
71
|
+
private override onMoveEnd;
|
|
72
|
+
/**
|
|
73
|
+
* Function called on moveend event only when the zoom has changed.
|
|
74
|
+
*
|
|
75
|
+
* @param {ol/MapEvent~MapEvent} evt Moveend event.
|
|
76
|
+
* @private
|
|
77
|
+
* @override
|
|
78
|
+
*/
|
|
79
|
+
private override onZoomEnd;
|
|
80
|
+
/**
|
|
81
|
+
* Update the cursor style when hovering a vehicle.
|
|
82
|
+
*
|
|
83
|
+
* @private
|
|
84
|
+
* @override
|
|
85
|
+
*/
|
|
86
|
+
private override onFeatureHover;
|
|
87
|
+
/**
|
|
88
|
+
* Display the complete trajectory of the vehicle.
|
|
89
|
+
*
|
|
90
|
+
* @private
|
|
91
|
+
* @override
|
|
92
|
+
*/
|
|
93
|
+
private override onFeatureClick;
|
|
94
|
+
/**
|
|
95
|
+
* Remove the trajectory form the list if necessary.
|
|
96
|
+
*
|
|
97
|
+
* @private
|
|
98
|
+
*/
|
|
99
|
+
private purgeTrajectory;
|
|
100
|
+
/**
|
|
101
|
+
* Send the current bbox to the websocket
|
|
102
|
+
*
|
|
103
|
+
* @private
|
|
104
|
+
*/
|
|
105
|
+
private setBbox;
|
|
106
|
+
/**
|
|
107
|
+
* Highlight the trajectory of journey.
|
|
108
|
+
* @private
|
|
109
|
+
*/
|
|
110
|
+
private highlightTrajectory;
|
|
111
|
+
/**
|
|
112
|
+
* Create a copy of the RealtimeLayer.
|
|
113
|
+
* @param {Object} newOptions Options to override
|
|
114
|
+
* @return {RealtimeLayer} A RealtimeLayer
|
|
115
|
+
*/
|
|
116
|
+
clone(newOptions: any): RealtimeLayer;
|
|
117
|
+
}
|
|
118
|
+
import Layer from "./Layer";
|
|
119
|
+
//# sourceMappingURL=RealtimeLayer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RealtimeLayer.d.ts","sourceRoot":"","sources":["../../../src/ol/layers/RealtimeLayer.js"],"names":[],"mappings":";AAYA;;;;;;;;;;;;;;;;;GAiBG;AACH,qDAHgB,8BAA8B,EAC9B,sBAAsB;IAGpC;;;;;OAKG;IACH,sBA2FC;IApFC,cAAc;IACd,aAsEI;IApDQ,0BAA8C;IAI9C,mCAAuD;IAmDnE,iBAAmD;IAInD,cAAc;IACd;;;;MAIC;IAGH,4BAqBC;IANO,iBAAuB;IAgB/B;;;;OAIG;IACH,qDAYC;IAED;;;;OAIG;IACH,kCAHW,OAAO,QAiBjB;IAED;;;;OAIG;IACH,4CAuBC;IAPG,uBAAyC;IAS7C;;OAEG;IACH,0BAEC;IAED,+DAMC;IAED;;;;;OAKG;IACH,2BAaC;IAED;;;;;;OAMG;IAEH,2BAEC;IAED;;;;;OAKG;IACH,gCAKC;IAED;;;;;OAKG;IACH,gCAQC;IAED;;;;OAIG;IACH,wBAMC;IAED;;;;OAIG;IACH,gBAQC;IAED;;;OAGG;IACH,4BAiBC;IAED;;;;OAIG;IACH,wBAFY,aAAa,CAIxB;CACF"}
|