adb-shared 6.2.15 → 6.2.16

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.
@@ -2893,13 +2893,14 @@ class AdbMapUtils {
2893
2893
  {
2894
2894
  name: 'Sveriges gränser',
2895
2895
  id: 7,
2896
- url: 'https://sosgeo.artdata.slu.se/geoserver/GeoRegion/wms',
2896
+ url: 'https://sosgeo.artdata.slu.se/geoserver/it.geosolutions/wms',
2897
2897
  minZoom: 6,
2898
2898
  maxZoom: 18,
2899
2899
  params: {
2900
2900
  maxNativeZoom: 14,
2901
2901
  attribution: '© <a href="https://www.lantmateriet.se/">Sveriges gränser</a>',
2902
- layers: 'GeoRegion:County', styles: 'municipality_name_yellow'
2902
+ layers: 'it.geosolutions:Sverige_epsg5845', styles: 'municipality_name_yellow',
2903
+ epsg: 5845
2903
2904
  },
2904
2905
  wms: true
2905
2906
  }
@@ -2934,18 +2935,13 @@ class AdbMapUtils {
2934
2935
  static addProviders(map) {
2935
2936
  const backgroundMaps = {};
2936
2937
  for (const value of Object.values(AdbMapUtils.Providers)) {
2937
- const baseOptions = {
2938
- ...value.params,
2939
- updateWhenZooming: false,
2940
- updateWhenIdle: true,
2941
- keepBuffer: 2,
2942
- crossOrigin: true
2943
- };
2944
2938
  backgroundMaps[value.name] = value.wms
2945
- ? Leaflet.tileLayer.wms(value.url, baseOptions)
2946
- : Leaflet.tileLayer(value.url, baseOptions);
2939
+ ? Leaflet.tileLayer.wms(value.url, value.params)
2940
+ : Leaflet.tileLayer(value.url, value.params);
2941
+ }
2942
+ if (backgroundMaps['Open Streetmap']) {
2943
+ map.addLayer(backgroundMaps['Open Streetmap']);
2947
2944
  }
2948
- map.addLayer(backgroundMaps['Open Streetmap']);
2949
2945
  Leaflet.control.layers(backgroundMaps, AdbMapUtils.OverlayMaps).addTo(map);
2950
2946
  }
2951
2947
  }