@artstesh/maps 4.1.34 → 4.1.36

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.
@@ -2472,6 +2472,10 @@ class RasterTileLayerSettings {
2472
2472
  * @default An empty array
2473
2473
  */
2474
2474
  this.requestHeaders = null;
2475
+ /**
2476
+ * The priority of showing - layers with higher zIndex cover others in case of collisions
2477
+ */
2478
+ this.zIndex = 1;
2475
2479
  this.operation = (d) => { var _a; return (_a = d[0]) !== null && _a !== void 0 ? _a : []; };
2476
2480
  }
2477
2481
  /**
@@ -2484,6 +2488,7 @@ class RasterTileLayerSettings {
2484
2488
  const result = new RasterTileLayerSettings();
2485
2489
  result.maxZoom = model.maxZoom;
2486
2490
  result.minZoom = model.minZoom;
2491
+ result.zIndex = model.zIndex;
2487
2492
  result.projection = model.projection;
2488
2493
  result.opacity = model.opacity;
2489
2494
  result.url = model.url;
@@ -2527,6 +2532,15 @@ class RasterTileLayerSettings {
2527
2532
  setMaxZoom(maxZoom) {
2528
2533
  return RasterTileLayerSettings.copy(Object.assign(Object.assign({}, this), { maxZoom }));
2529
2534
  }
2535
+ /**
2536
+ * Sets the z-index for the RasterTileLayerSettings.
2537
+ *
2538
+ * @param {number} zIndex - The new z-index to be assigned.
2539
+ * @return {RasterTileLayerSettings} A new RasterTileLayerSettings instance with the updated z-index.
2540
+ */
2541
+ setZIndex(zIndex) {
2542
+ return RasterTileLayerSettings.copy(Object.assign(Object.assign({}, this), { zIndex }));
2543
+ }
2530
2544
  /**
2531
2545
  * Sets the minimum zoom level for the Tile Layer.
2532
2546
  *
@@ -2565,6 +2579,8 @@ class RasterTileLayerSettings {
2565
2579
  return false;
2566
2580
  if (this.minZoom !== model.minZoom)
2567
2581
  return false;
2582
+ if (this.zIndex !== model.zIndex)
2583
+ return false;
2568
2584
  if (this.url !== model.url)
2569
2585
  return false;
2570
2586
  if (this.projection !== model.projection)
@@ -2595,9 +2611,9 @@ class RasterTileLayerFactory {
2595
2611
  const raster = new RasterSource({
2596
2612
  sources: [source],
2597
2613
  operationType: 'image',
2598
- operation: (arg) => settings.operation(arg),
2614
+ operation: settings.operation,
2599
2615
  });
2600
- return new ImageLayer({ source: raster, opacity: settings.opacity });
2616
+ return new ImageLayer({ source: raster, opacity: settings.opacity, zIndex: settings.zIndex });
2601
2617
  }
2602
2618
  getTileFunc(settings) {
2603
2619
  return (tileCoord) => {