@geops/rvf-mobility-web-component 0.1.127 → 0.1.128
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 +17 -0
- package/dist/index.js +518 -56
- package/index.js +80 -80
- package/package.json +1 -1
- package/src/NotificationsLayer/NotificationsLayer.tsx +7 -1
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@geops/rvf-mobility-web-component",
|
|
3
3
|
"license": "UNLICENSED",
|
|
4
4
|
"description": "Web components for rvf in the domains of mobility and logistics.",
|
|
5
|
-
"version": "0.1.
|
|
5
|
+
"version": "0.1.128",
|
|
6
6
|
"homepage": "https://rvf-mobility-web-component.vercel.app/",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "index.js",
|
|
@@ -66,10 +66,16 @@ function NotificationsLayer(props?: Partial<MocoLayerOptions>) {
|
|
|
66
66
|
if (!map || !layer) {
|
|
67
67
|
return;
|
|
68
68
|
}
|
|
69
|
-
|
|
69
|
+
|
|
70
|
+
// ONLY RVF for now: Optimization to avoid slowing down others requests
|
|
71
|
+
// on bad network environment
|
|
72
|
+
const key = map.once("rendercomplete", () => {
|
|
73
|
+
map.addLayer(layer);
|
|
74
|
+
});
|
|
70
75
|
|
|
71
76
|
return () => {
|
|
72
77
|
map.removeLayer(layer);
|
|
78
|
+
unByKey(key);
|
|
73
79
|
};
|
|
74
80
|
}, [map, layer]);
|
|
75
81
|
|