@geops/rvf-mobility-web-component 0.1.47-beta.0 → 0.1.48
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/CHANGELOG.md +19 -0
- package/iframe.html +141 -5590
- package/index.js +278 -162
- package/package.json +4 -3
- package/src/MobilityMap/MobilityMap.tsx +1 -1
- package/src/MobilityMap/MobilityMapAttributes.ts +23 -14
- package/src/NotificationLayer/NotificationLayer.tsx +9 -1
- package/src/RvfFeatureDetails/RvfFeatureDetails.tsx +21 -17
- package/src/RvfFeatureDetails/RvfLineNetworkDetails/RvfLineNetworkDetails.tsx +93 -115
- package/src/RvfFeatureDetails/RvfNotificationDetails/RvfNotificationDetails.tsx +196 -40
- package/src/RvfFeatureDetailsFooter/RvfFeatureDetailsFooter.tsx +43 -0
- package/src/RvfFeatureDetailsFooter/index.tsx +1 -0
- package/src/RvfMobilityMap/RvfMobilityMap.tsx +54 -48
- package/src/RvfOverlayContent/RvfOverlayContent.tsx +3 -1
- package/src/RvfSingleClickListener/RvfSingleClickListener.tsx +87 -67
- package/src/StopsSearch/StopsSearch.tsx +34 -10
- package/src/WindowMessageListener/WindowMessageListener.tsx +1 -0
- package/src/icons/ArrowRight/ArrowRight.tsx +19 -0
- package/src/icons/ArrowRight/arrow-right.svg +16 -0
- package/src/icons/ArrowRight/index.tsx +1 -0
- package/src/icons/Search/Search.tsx +0 -1
- package/src/icons/Warning/Warning.tsx +56 -0
- package/src/icons/Warning/index.tsx +1 -0
- package/src/icons/Warning/info-achtung-kreisrot-rot.svg +28 -0
- package/src/utils/constants.ts +10 -0
- package/src/utils/hooks/useLayerConfig.tsx +1 -0
|
@@ -1,8 +1,13 @@
|
|
|
1
|
+
import { getFeatureInfoAtCoordinate } from "mobility-toolbox-js/ol";
|
|
1
2
|
import { GeoJSON } from "ol/format";
|
|
2
3
|
import { unByKey } from "ol/Observable";
|
|
3
4
|
import { useCallback, useEffect } from "preact/hooks";
|
|
4
5
|
|
|
5
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
LAYER_NAME_REALTIME,
|
|
8
|
+
LAYER_NAME_STATIONS,
|
|
9
|
+
PROVIDER_LOGOS_BY_FEED_ID,
|
|
10
|
+
} from "../utils/constants";
|
|
6
11
|
import useMapContext from "../utils/hooks/useMapContext";
|
|
7
12
|
import useRvfContext from "../utils/hooks/useRvfContext";
|
|
8
13
|
import MobilityEvent from "../utils/MobilityEvent";
|
|
@@ -78,7 +83,7 @@ function SingleClickListener({ eventNode }: { eventNode: HTMLElement }) {
|
|
|
78
83
|
);
|
|
79
84
|
|
|
80
85
|
const onSingleClick = useCallback(
|
|
81
|
-
(evt: MapBrowserEvent<PointerEvent>) => {
|
|
86
|
+
async (evt: MapBrowserEvent<PointerEvent>) => {
|
|
82
87
|
if (!baseLayer?.mapLibreMap) {
|
|
83
88
|
return;
|
|
84
89
|
}
|
|
@@ -87,7 +92,8 @@ function SingleClickListener({ eventNode }: { eventNode: HTMLElement }) {
|
|
|
87
92
|
layerFilter: (l) => {
|
|
88
93
|
return l === realtimeLayer;
|
|
89
94
|
},
|
|
90
|
-
});
|
|
95
|
+
}) as Feature[];
|
|
96
|
+
realtimeFeature?.set("layerName", LAYER_NAME_REALTIME);
|
|
91
97
|
|
|
92
98
|
const stationsFeatures = evt.map.getFeaturesAtPixel(evt.pixel, {
|
|
93
99
|
layerFilter: (l) => {
|
|
@@ -96,7 +102,8 @@ function SingleClickListener({ eventNode }: { eventNode: HTMLElement }) {
|
|
|
96
102
|
});
|
|
97
103
|
const [stationFeature] = stationsFeatures.filter((feat) => {
|
|
98
104
|
return feat.get("tralis_network")?.includes(tenant);
|
|
99
|
-
});
|
|
105
|
+
}) as Feature[];
|
|
106
|
+
stationFeature?.set("layerName", LAYER_NAME_STATIONS);
|
|
100
107
|
|
|
101
108
|
const newStationId = stationFeature?.get("uid");
|
|
102
109
|
|
|
@@ -114,74 +121,87 @@ function SingleClickListener({ eventNode }: { eventNode: HTMLElement }) {
|
|
|
114
121
|
}
|
|
115
122
|
|
|
116
123
|
// Send all the features under the cursor
|
|
117
|
-
const features = evt.map.getFeaturesAtPixel(evt.pixel, {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
}) as Feature[];
|
|
124
|
+
// const features = evt.map.getFeaturesAtPixel(evt.pixel, {
|
|
125
|
+
// hitTolerance: 5,
|
|
126
|
+
// layerFilter: (l) => {
|
|
127
|
+
// console.log(queryablelayers);
|
|
128
|
+
// return queryablelayers
|
|
129
|
+
// ? queryablelayers.split(",").includes(l.get("name"))
|
|
130
|
+
// : l.get("isQueryable");
|
|
131
|
+
// },
|
|
132
|
+
// }) as Feature[];
|
|
133
|
+
|
|
134
|
+
const queryableLayers = evt.map.getAllLayers().filter((l) => {
|
|
135
|
+
return queryablelayers
|
|
136
|
+
? queryablelayers.split(",").includes(l.get("name"))
|
|
137
|
+
: l.get("isQueryable");
|
|
138
|
+
});
|
|
139
|
+
const featuresInfos = await getFeatureInfoAtCoordinate(
|
|
140
|
+
evt.coordinate,
|
|
141
|
+
queryableLayers,
|
|
142
|
+
5,
|
|
143
|
+
true,
|
|
144
|
+
);
|
|
145
|
+
|
|
146
|
+
// Set the layerName as property of the feature
|
|
147
|
+
featuresInfos.forEach((f) => {
|
|
148
|
+
f.features.forEach((feat) => {
|
|
149
|
+
feat.set("layerName", f.layer.get("name"));
|
|
150
|
+
});
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
const features = featuresInfos.flatMap((f) => {
|
|
154
|
+
return f.features;
|
|
155
|
+
});
|
|
126
156
|
|
|
127
157
|
// Append more infos about the features
|
|
128
|
-
const
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
(
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
);
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
// Sharing station
|
|
148
|
-
const sharingStationId = selectedFeature?.get("station_id");
|
|
149
|
-
if (sharingStationId) {
|
|
150
|
-
const sharingStationInfo =
|
|
151
|
-
await fetchSharingStation(sharingStationId);
|
|
152
|
-
selectedFeature.setProperties(sharingStationInfo);
|
|
153
|
-
selectedFeature.set(
|
|
154
|
-
"provider_logo",
|
|
155
|
-
PROVIDER_LOGOS_BY_FEED_ID[selectedFeature?.get("feed_id")],
|
|
156
|
-
);
|
|
157
|
-
}
|
|
158
|
+
for (const feature of features) {
|
|
159
|
+
const clusterId = feature.get("cluster_id");
|
|
160
|
+
if (clusterId) {
|
|
161
|
+
const vtFeat = feature.get("vectorTileFeature");
|
|
162
|
+
const sourceId = vtFeat.layer.source;
|
|
163
|
+
const leaves =
|
|
164
|
+
(await baseLayer.mapLibreMap
|
|
165
|
+
.getSource<GeoJSONSource>(sourceId)
|
|
166
|
+
?.getClusterLeaves(clusterId, 1000, 0)) || [];
|
|
167
|
+
|
|
168
|
+
feature.set(
|
|
169
|
+
"features",
|
|
170
|
+
leaves.map((l) => {
|
|
171
|
+
return geojson.readFeature(l);
|
|
172
|
+
}),
|
|
173
|
+
);
|
|
158
174
|
}
|
|
159
|
-
|
|
160
|
-
//
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
175
|
+
|
|
176
|
+
// Sharing station
|
|
177
|
+
const sharingStationId = selectedFeature?.get("station_id");
|
|
178
|
+
if (sharingStationId) {
|
|
179
|
+
const sharingStationInfo =
|
|
180
|
+
await fetchSharingStation(sharingStationId);
|
|
181
|
+
selectedFeature.setProperties(sharingStationInfo);
|
|
182
|
+
selectedFeature.set(
|
|
183
|
+
"provider_logo",
|
|
184
|
+
PROVIDER_LOGOS_BY_FEED_ID[selectedFeature?.get("feed_id")],
|
|
185
|
+
);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
if (newStationId || newTrainId || !features.length) {
|
|
190
|
+
setSelectedFeature(null);
|
|
191
|
+
setSelectedFeatures([]);
|
|
192
|
+
} else {
|
|
193
|
+
setSelectedFeatures(features);
|
|
194
|
+
|
|
195
|
+
// We prioritize some layers like the notification one over the others
|
|
196
|
+
const notificationFeature = features.find((feat) => {
|
|
197
|
+
return feat.get("situation");
|
|
198
|
+
});
|
|
199
|
+
if (notificationFeature) {
|
|
200
|
+
setSelectedFeature(notificationFeature);
|
|
170
201
|
} else {
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
// We prioritize some layers like the notification one over the others
|
|
174
|
-
const notificationFeature = features.find((feat) => {
|
|
175
|
-
return feat.get("severity");
|
|
176
|
-
});
|
|
177
|
-
if (notificationFeature) {
|
|
178
|
-
setSelectedFeature(notificationFeature);
|
|
179
|
-
} else {
|
|
180
|
-
setSelectedFeature(features[0]);
|
|
181
|
-
}
|
|
202
|
+
setSelectedFeature(features[0]);
|
|
182
203
|
}
|
|
183
|
-
}
|
|
184
|
-
void addMoreData(features);
|
|
204
|
+
}
|
|
185
205
|
},
|
|
186
206
|
[
|
|
187
207
|
baseLayer?.mapLibreMap,
|
|
@@ -12,22 +12,29 @@ import { twMerge } from "tailwind-merge";
|
|
|
12
12
|
|
|
13
13
|
import Cancel from "../icons/Cancel";
|
|
14
14
|
import Search from "../icons/Search";
|
|
15
|
+
import IconButton from "../ui/IconButton";
|
|
15
16
|
import useI18n from "../utils/hooks/useI18n";
|
|
16
17
|
import MobilityEvent from "../utils/MobilityEvent";
|
|
17
18
|
|
|
18
19
|
import type { StopsParameters, StopsResponse } from "mobility-toolbox-js/types";
|
|
19
|
-
import type {
|
|
20
|
+
import type {
|
|
21
|
+
HTMLAttributes,
|
|
22
|
+
PreactDOMAttributes,
|
|
23
|
+
TargetedKeyboardEvent,
|
|
24
|
+
} from "preact";
|
|
20
25
|
|
|
21
|
-
export type StopsFeature = StopsResponse["features"];
|
|
26
|
+
export type StopsFeature = StopsResponse["features"][0];
|
|
22
27
|
|
|
23
28
|
export type StopsSearchProps = {
|
|
24
29
|
apikey: string;
|
|
25
30
|
bbox?: string;
|
|
31
|
+
cancelButtonClassName?: string;
|
|
26
32
|
className?: string;
|
|
27
33
|
countrycode?: string;
|
|
28
34
|
event?: string;
|
|
29
35
|
field?: string;
|
|
30
36
|
inputClassName?: string;
|
|
37
|
+
inputContainerClassName?: string;
|
|
31
38
|
limit?: number;
|
|
32
39
|
mots?: string;
|
|
33
40
|
onselect?: (arg: StopsFeature) => void;
|
|
@@ -37,6 +44,7 @@ export type StopsSearchProps = {
|
|
|
37
44
|
resultClassName?: string;
|
|
38
45
|
resultsClassName?: string;
|
|
39
46
|
resultsContainerClassName?: string;
|
|
47
|
+
searchIconContainerClassName?: string;
|
|
40
48
|
url: string;
|
|
41
49
|
withResultsClassName?: string;
|
|
42
50
|
} & HTMLAttributes<HTMLDivElement> &
|
|
@@ -54,11 +62,13 @@ const getQueryForSelectedStation = (selectedStation?: StopsFeature): string => {
|
|
|
54
62
|
function StopsSearch({
|
|
55
63
|
apikey,
|
|
56
64
|
bbox,
|
|
65
|
+
cancelButtonClassName,
|
|
57
66
|
className,
|
|
58
67
|
countrycode,
|
|
59
68
|
event,
|
|
60
69
|
field,
|
|
61
70
|
inputClassName,
|
|
71
|
+
inputContainerClassName,
|
|
62
72
|
limit,
|
|
63
73
|
mots,
|
|
64
74
|
onselect,
|
|
@@ -68,6 +78,7 @@ function StopsSearch({
|
|
|
68
78
|
resultClassName,
|
|
69
79
|
resultsClassName,
|
|
70
80
|
resultsContainerClassName,
|
|
81
|
+
searchIconContainerClassName,
|
|
71
82
|
url = "https://api.geops.io/stops/v1/",
|
|
72
83
|
withResultsClassName,
|
|
73
84
|
}: StopsSearchProps) {
|
|
@@ -217,14 +228,24 @@ function StopsSearch({
|
|
|
217
228
|
)}
|
|
218
229
|
ref={myRef}
|
|
219
230
|
>
|
|
220
|
-
<div
|
|
231
|
+
<div
|
|
232
|
+
className={twMerge(
|
|
233
|
+
"text-grey flex items-center",
|
|
234
|
+
searchIconContainerClassName,
|
|
235
|
+
)}
|
|
236
|
+
>
|
|
221
237
|
<Search className="size-4" />
|
|
222
238
|
</div>
|
|
223
|
-
<div
|
|
239
|
+
<div
|
|
240
|
+
className={twMerge(
|
|
241
|
+
"@container/inputsearch flex grow items-center border-b-2 border-solid",
|
|
242
|
+
inputContainerClassName,
|
|
243
|
+
)}
|
|
244
|
+
>
|
|
224
245
|
<input
|
|
225
246
|
autoComplete="off"
|
|
226
247
|
className={twMerge(
|
|
227
|
-
"h-8 flex-1 outline-0 placeholder:text-zinc-400",
|
|
248
|
+
"h-8 flex-1 overflow-hidden text-ellipsis outline-0 placeholder:text-zinc-400",
|
|
228
249
|
inputClassName,
|
|
229
250
|
)}
|
|
230
251
|
id="searchfield"
|
|
@@ -232,7 +253,7 @@ function StopsSearch({
|
|
|
232
253
|
// @ts-expect-error target is missing
|
|
233
254
|
setQuery(evt.target.value);
|
|
234
255
|
}}
|
|
235
|
-
onKeyUp={(evt:
|
|
256
|
+
onKeyUp={(evt: TargetedKeyboardEvent<HTMLInputElement>) => {
|
|
236
257
|
if (evt.key === "Enter") {
|
|
237
258
|
if (results?.length > 0) {
|
|
238
259
|
setSelectedStation(results[0]);
|
|
@@ -244,15 +265,18 @@ function StopsSearch({
|
|
|
244
265
|
value={query || ""}
|
|
245
266
|
/>
|
|
246
267
|
{query.length > 0 && (
|
|
247
|
-
<
|
|
248
|
-
className=
|
|
268
|
+
<IconButton
|
|
269
|
+
className={twMerge(
|
|
270
|
+
"flex !size-[32px] items-center rounded-none border-none bg-transparent shadow-none",
|
|
271
|
+
cancelButtonClassName,
|
|
272
|
+
)}
|
|
249
273
|
onClick={() => {
|
|
250
274
|
setQuery("");
|
|
251
275
|
setResults(undefined);
|
|
252
276
|
}}
|
|
253
277
|
>
|
|
254
|
-
<Cancel
|
|
255
|
-
</
|
|
278
|
+
<Cancel />
|
|
279
|
+
</IconButton>
|
|
256
280
|
)}
|
|
257
281
|
</div>
|
|
258
282
|
</div>
|
|
@@ -25,6 +25,7 @@ function WindowMessageListener({ eventNode }: { eventNode: HTMLElement }) {
|
|
|
25
25
|
useEffect(() => {
|
|
26
26
|
const onMessage = (event) => {
|
|
27
27
|
if (event.data.situations) {
|
|
28
|
+
console.log("Setting preview situations", event.data.situations);
|
|
28
29
|
setPreviewNotifications(event.data.situations);
|
|
29
30
|
}
|
|
30
31
|
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { SVGProps } from "preact/compat";
|
|
2
|
+
|
|
3
|
+
function ArrowRight(props: SVGProps<SVGSVGElement>) {
|
|
4
|
+
return (
|
|
5
|
+
<svg
|
|
6
|
+
fill="currentColor"
|
|
7
|
+
height="24px"
|
|
8
|
+
version="1.1"
|
|
9
|
+
viewBox="0 0 24 24"
|
|
10
|
+
width="24px"
|
|
11
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
12
|
+
{...props}
|
|
13
|
+
>
|
|
14
|
+
<path d="M13.2928932,5.29289322 C13.6834175,4.90236893 14.3165825,4.90236893 14.7071068,5.29289322 L20.7071068,11.2928932 C20.7355731,11.3213595 20.7623312,11.3515341 20.787214,11.3832499 C20.7927155,11.3901576 20.7982466,11.397397 20.8036654,11.4046934 C20.8215099,11.4288693 20.8382813,11.453725 20.8539326,11.4793398 C20.8613931,11.4913869 20.8685012,11.5036056 20.8753288,11.5159379 C20.8862061,11.5357061 20.8966234,11.5561086 20.9063462,11.5769009 C20.914321,11.5939015 20.9218036,11.6112044 20.9287745,11.628664 C20.9366843,11.6484208 20.9438775,11.6682023 20.9504533,11.6882636 C20.9552713,11.7031487 20.9599023,11.7185367 20.9641549,11.734007 C20.9701664,11.7555635 20.9753602,11.7772539 20.9798348,11.7992059 C20.9832978,11.8166247 20.9863719,11.834051 20.9889822,11.8515331 C20.9962388,11.8996379 21,11.9493797 21,12 L20.9962979,11.9137692 C20.9978436,11.9317345 20.9989053,11.9497336 20.9994829,11.9677454 L21,12 C21,12.0112225 20.9998151,12.0224019 20.9994483,12.0335352 C20.9988772,12.050591 20.997855,12.0679231 20.996384,12.0852242 C20.994564,12.1070574 20.9920941,12.1281144 20.9889807,12.1489612 C20.9863719,12.165949 20.9832978,12.1833753 20.9797599,12.2007258 C20.9753602,12.2227461 20.9701664,12.2444365 20.964279,12.2658396 C20.9599023,12.2814633 20.9552713,12.2968513 20.9502619,12.3121425 C20.9438775,12.3317977 20.9366843,12.3515792 20.928896,12.3710585 C20.9218036,12.3887956 20.914321,12.4060985 20.9063266,12.4232215 C20.8966234,12.4438914 20.8862061,12.4642939 20.8751242,12.484277 C20.8685012,12.4963944 20.8613931,12.5086131 20.8540045,12.5207088 C20.8382813,12.546275 20.8215099,12.5711307 20.8036865,12.5951593 C20.774687,12.6343256 20.7425008,12.6717127 20.7071068,12.7071068 L20.787214,12.6167501 C20.7849289,12.6196628 20.7826279,12.6225624 20.7803112,12.625449 L20.7071068,12.7071068 L14.7071068,18.7071068 C14.3165825,19.0976311 13.6834175,19.0976311 13.2928932,18.7071068 C12.9023689,18.3165825 12.9023689,17.6834175 13.2928932,17.2928932 L17.584,13 L4,13 C3.48716416,13 3.06449284,12.6139598 3.00672773,12.1166211 L3,12 C3,11.4477153 3.44771525,11 4,11 L17.586,11 L13.2928932,6.70710678 C12.9324093,6.34662282 12.9046797,5.77939176 13.2097046,5.38710056 Z"></path>
|
|
15
|
+
</svg>
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export default ArrowRight;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
+
<title>arrow-right</title>
|
|
4
|
+
<defs>
|
|
5
|
+
<path d="M13.2928932,5.29289322 C13.6834175,4.90236893 14.3165825,4.90236893 14.7071068,5.29289322 L20.7071068,11.2928932 C20.7355731,11.3213595 20.7623312,11.3515341 20.787214,11.3832499 C20.7927155,11.3901576 20.7982466,11.397397 20.8036654,11.4046934 C20.8215099,11.4288693 20.8382813,11.453725 20.8539326,11.4793398 C20.8613931,11.4913869 20.8685012,11.5036056 20.8753288,11.5159379 C20.8862061,11.5357061 20.8966234,11.5561086 20.9063462,11.5769009 C20.914321,11.5939015 20.9218036,11.6112044 20.9287745,11.628664 C20.9366843,11.6484208 20.9438775,11.6682023 20.9504533,11.6882636 C20.9552713,11.7031487 20.9599023,11.7185367 20.9641549,11.734007 C20.9701664,11.7555635 20.9753602,11.7772539 20.9798348,11.7992059 C20.9832978,11.8166247 20.9863719,11.834051 20.9889822,11.8515331 C20.9962388,11.8996379 21,11.9493797 21,12 L20.9962979,11.9137692 C20.9978436,11.9317345 20.9989053,11.9497336 20.9994829,11.9677454 L21,12 C21,12.0112225 20.9998151,12.0224019 20.9994483,12.0335352 C20.9988772,12.050591 20.997855,12.0679231 20.996384,12.0852242 C20.994564,12.1070574 20.9920941,12.1281144 20.9889807,12.1489612 C20.9863719,12.165949 20.9832978,12.1833753 20.9797599,12.2007258 C20.9753602,12.2227461 20.9701664,12.2444365 20.964279,12.2658396 C20.9599023,12.2814633 20.9552713,12.2968513 20.9502619,12.3121425 C20.9438775,12.3317977 20.9366843,12.3515792 20.928896,12.3710585 C20.9218036,12.3887956 20.914321,12.4060985 20.9063266,12.4232215 C20.8966234,12.4438914 20.8862061,12.4642939 20.8751242,12.484277 C20.8685012,12.4963944 20.8613931,12.5086131 20.8540045,12.5207088 C20.8382813,12.546275 20.8215099,12.5711307 20.8036865,12.5951593 C20.774687,12.6343256 20.7425008,12.6717127 20.7071068,12.7071068 L20.787214,12.6167501 C20.7849289,12.6196628 20.7826279,12.6225624 20.7803112,12.625449 L20.7071068,12.7071068 L14.7071068,18.7071068 C14.3165825,19.0976311 13.6834175,19.0976311 13.2928932,18.7071068 C12.9023689,18.3165825 12.9023689,17.6834175 13.2928932,17.2928932 L17.584,13 L4,13 C3.48716416,13 3.06449284,12.6139598 3.00672773,12.1166211 L3,12 C3,11.4477153 3.44771525,11 4,11 L17.586,11 L13.2928932,6.70710678 C12.9324093,6.34662282 12.9046797,5.77939176 13.2097046,5.38710056 Z" id="path-1"></path>
|
|
6
|
+
</defs>
|
|
7
|
+
<g id="arrow-right" stroke="none" fill="none">
|
|
8
|
+
<mask id="mask-2" fill="white">
|
|
9
|
+
<use xlink:href="#path-1"></use>
|
|
10
|
+
</mask>
|
|
11
|
+
<use id="Combined-Shape" fill="#000000" fill-rule="nonzero" xlink:href="#path-1"></use>
|
|
12
|
+
<g id="🎨Color" mask="url(#mask-2)" fill="#000000" fill-rule="evenodd">
|
|
13
|
+
<rect id="Rectangle" x="0" y="0" width="24" height="24"></rect>
|
|
14
|
+
</g>
|
|
15
|
+
</g>
|
|
16
|
+
</svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./ArrowRight";
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
function Warning({ ...props }) {
|
|
2
|
+
return (
|
|
3
|
+
<svg
|
|
4
|
+
height="24px"
|
|
5
|
+
version="1.1"
|
|
6
|
+
viewBox="0 0 24 24"
|
|
7
|
+
width="24px"
|
|
8
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
9
|
+
{...props}
|
|
10
|
+
>
|
|
11
|
+
<defs>
|
|
12
|
+
<polygon
|
|
13
|
+
id="path-1"
|
|
14
|
+
points="-1.11022302e-16 0 2.0005 0 2.0005 2.0002 -1.11022302e-16 2.0002"
|
|
15
|
+
></polygon>
|
|
16
|
+
<polygon id="path-3" points="0 0 2 0 2 7.9998 0 7.9998"></polygon>
|
|
17
|
+
</defs>
|
|
18
|
+
<g fill="none" fillRule="evenodd" stroke="none" strokeWidth="1">
|
|
19
|
+
<circle cx="12" cy="12" fill="#E3000B" id="Oval" r="11"></circle>
|
|
20
|
+
<g id="Group-9" transform="translate(10.999750, 6.500000)">
|
|
21
|
+
<g id="Group-3" transform="translate(0.000000, 8.999800)">
|
|
22
|
+
<mask fill="white" id="mask-2">
|
|
23
|
+
<use xlinkHref="#path-1"></use>
|
|
24
|
+
</mask>
|
|
25
|
+
<g id="Clip-2"></g>
|
|
26
|
+
<path
|
|
27
|
+
d="M0.29325,0.293 C-0.09775,0.684 -0.09775,1.317 0.29325,1.707 C0.68425,2.098 1.31725,2.098 1.70725,1.707 C2.09825,1.317 2.09825,0.684 1.70725,0.293 C1.51225,0.098 1.25825,0.001 1.00225,0 L0.99925,0 C0.74325,0.001 0.48825,0.098 0.29325,0.293"
|
|
28
|
+
fill="#FFFFFF"
|
|
29
|
+
id="Fill-1"
|
|
30
|
+
mask="url(#mask-2)"
|
|
31
|
+
></path>
|
|
32
|
+
</g>
|
|
33
|
+
<path
|
|
34
|
+
d="M0.99875,8.9998 L1.00275,8.9998 L0.99875,8.9998 Z"
|
|
35
|
+
fill="#FFFFFF"
|
|
36
|
+
id="Fill-4"
|
|
37
|
+
></path>
|
|
38
|
+
<g id="Group-8" transform="translate(0.000350, 0.000000)">
|
|
39
|
+
<mask fill="white" id="mask-4">
|
|
40
|
+
<use xlinkHref="#path-3"></use>
|
|
41
|
+
</mask>
|
|
42
|
+
<g id="Clip-7"></g>
|
|
43
|
+
<path
|
|
44
|
+
d="M1,-0.0002 C0.448,-0.0002 0,0.4478 0,0.9998 L0,6.9998 C0,7.4008 0.24,7.7428 0.582,7.9018 C0.71,7.9618 0.849,7.9998 1,7.9998 C1.151,7.9998 1.29,7.9618 1.418,7.9018 C1.76,7.7428 2,7.4008 2,6.9998 L2,0.9998 C2,0.4478 1.552,-0.0002 1,-0.0002"
|
|
45
|
+
fill="#FFFFFF"
|
|
46
|
+
id="Fill-6"
|
|
47
|
+
mask="url(#mask-4)"
|
|
48
|
+
></path>
|
|
49
|
+
</g>
|
|
50
|
+
</g>
|
|
51
|
+
</g>
|
|
52
|
+
</svg>
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export default Warning;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./Warning";
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24px" height="24px" viewBox="0 0 24 24" version="1.1">
|
|
3
|
+
<title>info/info-achtung-kreisrot</title>
|
|
4
|
+
<defs>
|
|
5
|
+
<polygon id="path-1" points="-1.11022302e-16 0 2.0005 0 2.0005 2.0002 -1.11022302e-16 2.0002"></polygon>
|
|
6
|
+
<polygon id="path-3" points="0 0 2 0 2 7.9998 0 7.9998"></polygon>
|
|
7
|
+
</defs>
|
|
8
|
+
<g id="info/info-achtung-kreisrot" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
9
|
+
<circle id="Oval" fill="#E3000B" cx="12" cy="12" r="11"></circle>
|
|
10
|
+
<g id="Group-9" transform="translate(10.999750, 6.500000)">
|
|
11
|
+
<g id="Group-3" transform="translate(0.000000, 8.999800)">
|
|
12
|
+
<mask id="mask-2" fill="white">
|
|
13
|
+
<use xlink:href="#path-1"></use>
|
|
14
|
+
</mask>
|
|
15
|
+
<g id="Clip-2"></g>
|
|
16
|
+
<path d="M0.29325,0.293 C-0.09775,0.684 -0.09775,1.317 0.29325,1.707 C0.68425,2.098 1.31725,2.098 1.70725,1.707 C2.09825,1.317 2.09825,0.684 1.70725,0.293 C1.51225,0.098 1.25825,0.001 1.00225,0 L0.99925,0 C0.74325,0.001 0.48825,0.098 0.29325,0.293" id="Fill-1" fill="#FFFFFF" mask="url(#mask-2)"></path>
|
|
17
|
+
</g>
|
|
18
|
+
<path d="M0.99875,8.9998 L1.00275,8.9998 L0.99875,8.9998 Z" id="Fill-4" fill="#FFFFFF"></path>
|
|
19
|
+
<g id="Group-8" transform="translate(0.000350, 0.000000)">
|
|
20
|
+
<mask id="mask-4" fill="white">
|
|
21
|
+
<use xlink:href="#path-3"></use>
|
|
22
|
+
</mask>
|
|
23
|
+
<g id="Clip-7"></g>
|
|
24
|
+
<path d="M1,-0.0002 C0.448,-0.0002 0,0.4478 0,0.9998 L0,6.9998 C0,7.4008 0.24,7.7428 0.582,7.9018 C0.71,7.9618 0.849,7.9998 1,7.9998 C1.151,7.9998 1.29,7.9618 1.418,7.9018 C1.76,7.7428 2,7.4008 2,6.9998 L2,0.9998 C2,0.4478 1.552,-0.0002 1,-0.0002" id="Fill-6" fill="#FFFFFF" mask="url(#mask-4)"></path>
|
|
25
|
+
</g>
|
|
26
|
+
</g>
|
|
27
|
+
</g>
|
|
28
|
+
</svg>
|
package/src/utils/constants.ts
CHANGED
|
@@ -72,6 +72,16 @@ export const DEFAULT_QUERYABLE_LAYERS = Object.keys(RVF_LAYERS_NAMES)
|
|
|
72
72
|
})
|
|
73
73
|
.toString();
|
|
74
74
|
|
|
75
|
+
export const LAYERS_WITH_LINK = Object.keys(RVF_LAYERS_NAMES)
|
|
76
|
+
.filter((name) => {
|
|
77
|
+
return (
|
|
78
|
+
name !== RVF_LAYERS_NAMES.tarifzonen &&
|
|
79
|
+
name !== RVF_LAYERS_NAMES.pois &&
|
|
80
|
+
name !== RVF_LAYERS_NAMES.echtzeit
|
|
81
|
+
);
|
|
82
|
+
})
|
|
83
|
+
.toString();
|
|
84
|
+
|
|
75
85
|
export const WFS_CARGO_BIKE_TYPE = "sharing_stations_cargo_bicycle";
|
|
76
86
|
export const WFS_CAR_TYPE = "sharing_stations_car";
|
|
77
87
|
export const WFS_BIKE_TYPE = "sharing_stations_bicycle";
|