@artstesh/maps 9.1.0-alpha.0 → 9.1.0-alpha.2

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.
@@ -27,7 +27,7 @@ import Static from 'ol/source/ImageStatic';
27
27
  import ImageLayer from 'ol/layer/Image';
28
28
  import RasterSource from 'ol/source/Raster';
29
29
  import TileLayer$1 from 'ol/layer/WebGLTile';
30
- import { NgIf, NgTemplateOutlet } from '@angular/common';
30
+ import { NgTemplateOutlet, NgIf } from '@angular/common';
31
31
  import Map from 'ol/Map';
32
32
  import View from 'ol/View';
33
33
  import Style from 'ol/style/Style';
@@ -2883,6 +2883,14 @@ class GeotiffTileLayerSettings {
2883
2883
  * The priority of showing - layers with higher zIndex cover others in case of collisions
2884
2884
  */
2885
2885
  zIndex = 1;
2886
+ /**
2887
+ * Represents the size of a block in a specific context, typically used to define dimensions or capacity.
2888
+ *
2889
+ * Optional property that, if defined, specifies the numerical value for the block size.
2890
+ *
2891
+ * @type {number|undefined}
2892
+ */
2893
+ blockSize = undefined;
2886
2894
  /**
2887
2895
  * Creates a copy of the given tile layer settings.
2888
2896
  *
@@ -2895,6 +2903,7 @@ class GeotiffTileLayerSettings {
2895
2903
  result.min = model.min;
2896
2904
  result.zIndex = model.zIndex;
2897
2905
  result.style = model.style;
2906
+ result.blockSize = model.blockSize;
2898
2907
  result.opacity = model.opacity;
2899
2908
  result.url = model.url;
2900
2909
  return result;
@@ -2953,6 +2962,15 @@ class GeotiffTileLayerSettings {
2953
2962
  setOpacity(opacity) {
2954
2963
  return GeotiffTileLayerSettings.copy({ ...this, opacity });
2955
2964
  }
2965
+ /**
2966
+ * Sets the block size for the GeoTIFF tile layer.
2967
+ *
2968
+ * @param {number} blockSize - The size of the block to be set. This value typically defines the number of pixels for determining how data is grouped in tiles.
2969
+ * @return {GeotiffTileLayerSettings} A new instance of `GeotiffTileLayerSettings` with the updated block size.
2970
+ */
2971
+ setBlockSize(blockSize) {
2972
+ return GeotiffTileLayerSettings.copy({ ...this, blockSize });
2973
+ }
2956
2974
  /**
2957
2975
  * Checks if the current instance of GeotiffTileLayerSettings is equal to the given model.
2958
2976
  * @param {GeotiffTileLayerSettings} model - The model to compare against.
@@ -2970,6 +2988,8 @@ class GeotiffTileLayerSettings {
2970
2988
  return false;
2971
2989
  if (this.style !== model.style)
2972
2990
  return false;
2991
+ if (this.blockSize !== model.blockSize)
2992
+ return false;
2973
2993
  if (this.opacity !== model.opacity)
2974
2994
  return false;
2975
2995
  return true;
@@ -2985,7 +3005,7 @@ class GeotiffTileLayerFactory {
2985
3005
  min: settings.min,
2986
3006
  max: settings.max,
2987
3007
  },
2988
- ],
3008
+ ], sourceOptions: { blockSize: settings.blockSize }
2989
3009
  });
2990
3010
  return new TileLayer$1({
2991
3011
  style: settings.style,
@@ -3133,14 +3153,14 @@ class MapPlateComponent extends DestructibleComponent {
3133
3153
  this.registrator.down();
3134
3154
  };
3135
3155
  setOsm() {
3136
- if (!this.map)
3156
+ if (!this.map())
3137
3157
  return;
3138
3158
  this.osmUrl.set(`https://mt{0-3}.google.com/vt/lyrs=${MapLyrsLabel.get(this._settings.lyrs)}&hl=${this._settings.language}&x={x}&y={y}&z={z}`);
3139
3159
  this.detector.detectChanges();
3140
3160
  this.map()?.updateSize();
3141
3161
  }
3142
3162
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: MapPlateComponent, deps: [{ token: i0.ElementRef }, { token: MapPostboyService }, { token: MapPlateFactory }, { token: MessageRegistratorService }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
3143
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.18", type: MapPlateComponent, isStandalone: true, selector: "art-map-plate", inputs: { contentRef: { classPropertyName: "contentRef", publicName: "contentRef", isSignal: true, isRequired: true, transformFunction: null }, settings: { classPropertyName: "settings", publicName: "settings", isSignal: false, isRequired: false, transformFunction: null } }, providers: [
3163
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: MapPlateComponent, isStandalone: true, selector: "art-map-plate", inputs: { contentRef: { classPropertyName: "contentRef", publicName: "contentRef", isSignal: true, isRequired: true, transformFunction: null }, settings: { classPropertyName: "settings", publicName: "settings", isSignal: false, isRequired: false, transformFunction: null } }, providers: [
3144
3164
  MessageRegistratorService,
3145
3165
  MapStateService,
3146
3166
  MapManagementService,
@@ -3151,7 +3171,7 @@ class MapPlateComponent extends DestructibleComponent {
3151
3171
  FeatureService,
3152
3172
  FeatureModificationService,
3153
3173
  ControlsService,
3154
- ], usesInheritance: true, ngImport: i0, template: "<ng-container *ngTemplateOutlet=\"contentRef()\"> </ng-container>\r\n<art-osm-tile-layer *ngIf=\"osmUrl() && map\" [map]=\"map()!\" [url]=\"osmUrl()\" [opacity]=\"_settings.osmOpacity\"></art-osm-tile-layer>\r\n<art-feature-layer *ngIf=\"map\" [settings]=\"drawingLayerSettings\"></art-feature-layer>\r\n", styles: ["art-map-plate{display:block;width:100%;height:100%}\n"], dependencies: [{ kind: "component", type: OsmTileLayerComponent, selector: "art-osm-tile-layer", inputs: ["url", "opacity", "map"] }, { kind: "component", type: FeatureLayerComponent, selector: "art-feature-layer", inputs: ["settings"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
3174
+ ], usesInheritance: true, ngImport: i0, template: "<ng-container *ngTemplateOutlet=\"contentRef()\"> </ng-container>\r\n@if (osmUrl() && map()) {\r\n <art-osm-tile-layer [map]=\"map()!\" [url]=\"osmUrl()\" [opacity]=\"_settings.osmOpacity\"></art-osm-tile-layer>\r\n}\r\n@if (map()) {\r\n <art-feature-layer [settings]=\"drawingLayerSettings\"></art-feature-layer>\r\n}\r\n", styles: ["art-map-plate{display:block;width:100%;height:100%}\n"], dependencies: [{ kind: "component", type: OsmTileLayerComponent, selector: "art-osm-tile-layer", inputs: ["url", "opacity", "map"] }, { kind: "component", type: FeatureLayerComponent, selector: "art-feature-layer", inputs: ["settings"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
3155
3175
  }
3156
3176
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: MapPlateComponent, decorators: [{
3157
3177
  type: Component,
@@ -3166,7 +3186,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
3166
3186
  FeatureService,
3167
3187
  FeatureModificationService,
3168
3188
  ControlsService,
3169
- ], encapsulation: ViewEncapsulation.None, imports: [OsmTileLayerComponent, FeatureLayerComponent, NgIf, NgTemplateOutlet], template: "<ng-container *ngTemplateOutlet=\"contentRef()\"> </ng-container>\r\n<art-osm-tile-layer *ngIf=\"osmUrl() && map\" [map]=\"map()!\" [url]=\"osmUrl()\" [opacity]=\"_settings.osmOpacity\"></art-osm-tile-layer>\r\n<art-feature-layer *ngIf=\"map\" [settings]=\"drawingLayerSettings\"></art-feature-layer>\r\n", styles: ["art-map-plate{display:block;width:100%;height:100%}\n"] }]
3189
+ ], encapsulation: ViewEncapsulation.None, imports: [OsmTileLayerComponent, FeatureLayerComponent, NgIf, NgTemplateOutlet], template: "<ng-container *ngTemplateOutlet=\"contentRef()\"> </ng-container>\r\n@if (osmUrl() && map()) {\r\n <art-osm-tile-layer [map]=\"map()!\" [url]=\"osmUrl()\" [opacity]=\"_settings.osmOpacity\"></art-osm-tile-layer>\r\n}\r\n@if (map()) {\r\n <art-feature-layer [settings]=\"drawingLayerSettings\"></art-feature-layer>\r\n}\r\n", styles: ["art-map-plate{display:block;width:100%;height:100%}\n"] }]
3170
3190
  }], ctorParameters: () => [{ type: i0.ElementRef }, { type: MapPostboyService }, { type: MapPlateFactory }, { type: MessageRegistratorService }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }], propDecorators: { contentRef: [{ type: i0.Input, args: [{ isSignal: true, alias: "contentRef", required: true }] }], settings: [{
3171
3191
  type: Input
3172
3192
  }] } });