@nextgis/ngw-leaflet 1.9.7 → 1.10.0

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.
@@ -1,4 +1,4 @@
1
- /** Bundle of @nextgis/ngw-leaflet; version: 1.9.7; author: NextGIS */
1
+ /** Bundle of @nextgis/ngw-leaflet; version: 1.10.0; author: NextGIS */
2
2
  import 'leaflet/dist/leaflet.css';
3
3
  import { Icon } from 'leaflet';
4
4
  import { NgwMap } from '@nextgis/ngw-map';
@@ -1,4 +1,4 @@
1
- /** Bundle of @nextgis/ngw-leaflet; version: 1.9.7; author: NextGIS */
1
+ /** Bundle of @nextgis/ngw-leaflet; version: 1.10.0; author: NextGIS */
2
2
  var NgwLeaflet = (function () {
3
3
  'use strict';
4
4
 
@@ -15950,7 +15950,7 @@ var NgwLeaflet = (function () {
15950
15950
  minZoom: 0,
15951
15951
  maxZoom: 20,
15952
15952
  paint: {
15953
- color: 'blue',
15953
+ color: '#0000ff',
15954
15954
  opacity: 0.4,
15955
15955
  strokeOpacity: 1,
15956
15956
  stroke: true,
@@ -15958,7 +15958,7 @@ var NgwLeaflet = (function () {
15958
15958
  weight: 1,
15959
15959
  },
15960
15960
  selectedPaint: {
15961
- color: 'darkblue',
15961
+ color: '#00008b',
15962
15962
  opacity: 0.4,
15963
15963
  strokeOpacity: 1,
15964
15964
  stroke: true,
@@ -17234,6 +17234,30 @@ var NgwLeaflet = (function () {
17234
17234
  adapter.clearLayer(cb);
17235
17235
  }
17236
17236
  };
17237
+ WebMapLayers.prototype.setLayerPaint = function (layerDef, paint) {
17238
+ var layer = this.getLayer(layerDef);
17239
+ if (paint && layer && layer.setPaint) {
17240
+ layer.setPaint(paint);
17241
+ }
17242
+ };
17243
+ WebMapLayers.prototype.setLayerSelectedPaint = function (layerDef, paint) {
17244
+ var layer = this.getLayer(layerDef);
17245
+ if (paint && layer && layer.setSelectedPaint) {
17246
+ layer.setSelectedPaint(paint);
17247
+ }
17248
+ };
17249
+ WebMapLayers.prototype.updateLayerPaint = function (layerDef, paint) {
17250
+ var layer = this.getLayer(layerDef);
17251
+ if (paint && layer && layer.updatePaint) {
17252
+ layer.updatePaint(paint);
17253
+ }
17254
+ };
17255
+ WebMapLayers.prototype.updateLayerSelectedPaint = function (layerDef, paint) {
17256
+ var layer = this.getLayer(layerDef);
17257
+ if (paint && layer && layer.updateSelectedPaint) {
17258
+ layer.updateSelectedPaint(paint);
17259
+ }
17260
+ };
17237
17261
  WebMapLayers.prototype.getAttributions = function (options) {
17238
17262
  var attributions = [];
17239
17263
  for (var l in this._layers) {
@@ -22847,6 +22871,9 @@ var NgwLeaflet = (function () {
22847
22871
  if (options.bar) {
22848
22872
  element.classList.add('leaflet-bar');
22849
22873
  }
22874
+ if (options.addClass) {
22875
+ element.classList.add(options.addClass);
22876
+ }
22850
22877
  if (!options.margin && !options.bar) {
22851
22878
  element.style.marginBottom = '0px';
22852
22879
  element.style.marginTop = '0px';