@mapcomponents/react-maplibre 1.0.6 → 1.0.8

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.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.map.style._layers); _i < _c.length; _i++) {
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);
@@ -3424,7 +3424,7 @@ function LayerListItem(_a) {
3424
3424
  var _layerComponent = useMemo(function () {
3425
3425
  var _a;
3426
3426
  if (layerComponent && type === 'layer') {
3427
- switch (layerComponent.type.name) {
3427
+ switch (layerComponent.type.displayName) {
3428
3428
  case 'MlWmsLayer':
3429
3429
  return React__default.cloneElement(layerComponent, __assign(__assign({}, layerComponent === null || layerComponent === void 0 ? void 0 : layerComponent.props), { visible: _visible }));
3430
3430
  case 'MlVectorTileLayer':