@mapcomponents/react-maplibre 1.0.6 → 1.0.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/CHANGELOG.md +13 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -2688,7 +2688,7 @@ function useSource(props) {
|
|
|
2688
2688
|
var removeSource = useCallback(function () {
|
|
2689
2689
|
var _a, _b;
|
|
2690
2690
|
if (mapHook.map && ((_b = (_a = mapHook.map) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b._layers)) {
|
|
2691
|
-
for (var _i = 0, _c = Object.entries(mapHook.map.
|
|
2691
|
+
for (var _i = 0, _c = Object.entries(mapHook.map.style._layers); _i < _c.length; _i++) {
|
|
2692
2692
|
var _d = _c[_i], layerId = _d[0], layer = _d[1];
|
|
2693
2693
|
if (layer.source === sourceId.current) {
|
|
2694
2694
|
mapHook.map.removeLayer(layerId);
|