@classic-homes/maps-react 0.2.6 → 0.2.7
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/dist/index.cjs +4 -2
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -440,8 +440,10 @@ var Map2 = React26__namespace.forwardRef(
|
|
|
440
440
|
attributionControl: attributionControl ? { customAttribution } : false
|
|
441
441
|
});
|
|
442
442
|
mapRef.current = map;
|
|
443
|
-
map.on("
|
|
444
|
-
|
|
443
|
+
map.on("data", (e) => {
|
|
444
|
+
if (e.dataType === "style") {
|
|
445
|
+
setStyleVersion((v) => v + 1);
|
|
446
|
+
}
|
|
445
447
|
});
|
|
446
448
|
if (navigationControl) {
|
|
447
449
|
map.addControl(
|
package/dist/index.d.cts
CHANGED
|
@@ -108,7 +108,7 @@ interface MapContextValue {
|
|
|
108
108
|
map: Map$1 | null;
|
|
109
109
|
/** Whether the map has loaded */
|
|
110
110
|
loaded: boolean;
|
|
111
|
-
/** Counter incremented on each style
|
|
111
|
+
/** Counter incremented on each style change (via data event), used to re-initialize sources/layers */
|
|
112
112
|
styleVersion: number;
|
|
113
113
|
/** Set the map style programmatically (e.g. basemap switching) */
|
|
114
114
|
setMapStyle?: (style: string | StyleSpecification) => void;
|
package/dist/index.d.ts
CHANGED
|
@@ -108,7 +108,7 @@ interface MapContextValue {
|
|
|
108
108
|
map: Map$1 | null;
|
|
109
109
|
/** Whether the map has loaded */
|
|
110
110
|
loaded: boolean;
|
|
111
|
-
/** Counter incremented on each style
|
|
111
|
+
/** Counter incremented on each style change (via data event), used to re-initialize sources/layers */
|
|
112
112
|
styleVersion: number;
|
|
113
113
|
/** Set the map style programmatically (e.g. basemap switching) */
|
|
114
114
|
setMapStyle?: (style: string | StyleSpecification) => void;
|
package/dist/index.js
CHANGED
|
@@ -416,8 +416,10 @@ var Map2 = React26.forwardRef(
|
|
|
416
416
|
attributionControl: attributionControl ? { customAttribution } : false
|
|
417
417
|
});
|
|
418
418
|
mapRef.current = map;
|
|
419
|
-
map.on("
|
|
420
|
-
|
|
419
|
+
map.on("data", (e) => {
|
|
420
|
+
if (e.dataType === "style") {
|
|
421
|
+
setStyleVersion((v) => v + 1);
|
|
422
|
+
}
|
|
421
423
|
});
|
|
422
424
|
if (navigationControl) {
|
|
423
425
|
map.addControl(
|