@artstesh/maps 1.1.36 → 1.1.37
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/bundles/maps-components-src-map.umd.js +29 -2
- package/dist/bundles/maps-components-src-map.umd.js.map +1 -1
- package/dist/bundles/maps-components.umd.js +29 -2
- package/dist/bundles/maps-components.umd.js.map +1 -1
- package/dist/esm2015/map/map-plate/layers/osm-tile-layer/osm-tile-layer.component.js +12 -2
- package/dist/esm2015/map/map-plate/map-plate.component.js +2 -2
- package/dist/esm2015/map/models/map-settings.js +14 -1
- package/dist/esm2015/src/map/map-plate/layers/osm-tile-layer/osm-tile-layer.component.js +12 -2
- package/dist/esm2015/src/map/map-plate/map-plate.component.js +2 -2
- package/dist/esm2015/src/map/models/map-settings.js +14 -1
- package/dist/fesm2015/maps-components-src-map.js +25 -2
- package/dist/fesm2015/maps-components-src-map.js.map +1 -1
- package/dist/fesm2015/maps-components.js +25 -2
- package/dist/fesm2015/maps-components.js.map +1 -1
- package/dist/map/map-plate/layers/osm-tile-layer/osm-tile-layer.component.d.ts +4 -2
- package/dist/map/models/map-settings.d.ts +8 -0
- package/dist/src/map/map-plate/layers/osm-tile-layer/osm-tile-layer.component.d.ts +4 -2
- package/dist/src/map/models/map-settings.d.ts +8 -0
- package/package.json +1 -1
|
@@ -557,6 +557,7 @@
|
|
|
557
557
|
this.zoom = 4;
|
|
558
558
|
this.lyrs = exports.MapLyrs.Hybrid;
|
|
559
559
|
this.language = 'en';
|
|
560
|
+
this.osmOpacity = 1;
|
|
560
561
|
this.interactionSettings = {};
|
|
561
562
|
}
|
|
562
563
|
MapSettings.copy = function (model) {
|
|
@@ -568,6 +569,7 @@
|
|
|
568
569
|
result.lyrs = model.lyrs;
|
|
569
570
|
result.interactionSettings = model.interactionSettings;
|
|
570
571
|
result.language = model.language;
|
|
572
|
+
result.osmOpacity = model.osmOpacity;
|
|
571
573
|
return result;
|
|
572
574
|
};
|
|
573
575
|
/**
|
|
@@ -634,6 +636,15 @@
|
|
|
634
636
|
MapSettings.prototype.setLanguage = function (language) {
|
|
635
637
|
return MapSettings.copy(Object.assign(Object.assign({}, this), { language: language }));
|
|
636
638
|
};
|
|
639
|
+
/**
|
|
640
|
+
* Sets the opacity level for the OpenStreetMap layer.
|
|
641
|
+
*
|
|
642
|
+
* @param {number} osmOpacity - The opacity value for the OpenStreetMap layer, where 0 is fully transparent and 1 is fully opaque.
|
|
643
|
+
* @return {MapSettings} A new MapSettings instance with the updated OpenStreetMap opacity.
|
|
644
|
+
*/
|
|
645
|
+
MapSettings.prototype.setOsmOpacity = function (osmOpacity) {
|
|
646
|
+
return MapSettings.copy(Object.assign(Object.assign({}, this), { osmOpacity: osmOpacity }));
|
|
647
|
+
};
|
|
637
648
|
/**
|
|
638
649
|
* Compares the current MapSettings instance with another to determine if they are identical.
|
|
639
650
|
*
|
|
@@ -653,6 +664,8 @@
|
|
|
653
664
|
return false;
|
|
654
665
|
if (this.interactionSettings !== model.interactionSettings)
|
|
655
666
|
return false;
|
|
667
|
+
if (this.osmOpacity !== model.osmOpacity)
|
|
668
|
+
return false;
|
|
656
669
|
return this.center.length === model.center.length && !this.center.filter(function (c, i) { return c !== model.center[i]; }).length;
|
|
657
670
|
};
|
|
658
671
|
return MapSettings;
|
|
@@ -2416,6 +2429,7 @@
|
|
|
2416
2429
|
function OsmTileLayerComponent() {
|
|
2417
2430
|
var _this = _super.call(this) || this;
|
|
2418
2431
|
_this._url = '';
|
|
2432
|
+
_this._opacity = 1;
|
|
2419
2433
|
return _this;
|
|
2420
2434
|
}
|
|
2421
2435
|
Object.defineProperty(OsmTileLayerComponent.prototype, "url", {
|
|
@@ -2428,6 +2442,16 @@
|
|
|
2428
2442
|
enumerable: false,
|
|
2429
2443
|
configurable: true
|
|
2430
2444
|
});
|
|
2445
|
+
Object.defineProperty(OsmTileLayerComponent.prototype, "opacity", {
|
|
2446
|
+
set: function (value) {
|
|
2447
|
+
if (!value || this._opacity === value)
|
|
2448
|
+
return;
|
|
2449
|
+
this._opacity = value;
|
|
2450
|
+
this.initLayer();
|
|
2451
|
+
},
|
|
2452
|
+
enumerable: false,
|
|
2453
|
+
configurable: true
|
|
2454
|
+
});
|
|
2431
2455
|
Object.defineProperty(OsmTileLayerComponent.prototype, "map", {
|
|
2432
2456
|
set: function (value) {
|
|
2433
2457
|
if (!value || this._map === value)
|
|
@@ -2456,6 +2480,7 @@
|
|
|
2456
2480
|
source: new OSM__default["default"]({
|
|
2457
2481
|
url: this._url,
|
|
2458
2482
|
}),
|
|
2483
|
+
opacity: this._opacity,
|
|
2459
2484
|
});
|
|
2460
2485
|
this.layer.set('name', 'osm-tile-layer');
|
|
2461
2486
|
this._map.addLayer(this.layer);
|
|
@@ -2463,7 +2488,7 @@
|
|
|
2463
2488
|
return OsmTileLayerComponent;
|
|
2464
2489
|
}(DestructibleComponent));
|
|
2465
2490
|
OsmTileLayerComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: OsmTileLayerComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
2466
|
-
OsmTileLayerComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: OsmTileLayerComponent, selector: "art-osm-tile-layer", inputs: { url: "url", map: "map" }, usesInheritance: true, ngImport: i0__namespace, template: '', isInline: true, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
2491
|
+
OsmTileLayerComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: OsmTileLayerComponent, selector: "art-osm-tile-layer", inputs: { url: "url", opacity: "opacity", map: "map" }, usesInheritance: true, ngImport: i0__namespace, template: '', isInline: true, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
2467
2492
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: OsmTileLayerComponent, decorators: [{
|
|
2468
2493
|
type: i0.Component,
|
|
2469
2494
|
args: [{
|
|
@@ -2474,6 +2499,8 @@
|
|
|
2474
2499
|
}]
|
|
2475
2500
|
}], ctorParameters: function () { return []; }, propDecorators: { url: [{
|
|
2476
2501
|
type: i0.Input
|
|
2502
|
+
}], opacity: [{
|
|
2503
|
+
type: i0.Input
|
|
2477
2504
|
}], map: [{
|
|
2478
2505
|
type: i0.Input
|
|
2479
2506
|
}] } });
|
|
@@ -3591,7 +3618,7 @@
|
|
|
3591
3618
|
FeatureService,
|
|
3592
3619
|
FeatureModificationService,
|
|
3593
3620
|
ControlsService,
|
|
3594
|
-
], usesInheritance: true, ngImport: i0__namespace, template: "<ng-content></ng-content>\r\n<art-osm-tile-layer *ngIf=\"osmUrl && map\" [map]=\"map\" [url]=\"osmUrl\"></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"], components: [{ type: OsmTileLayerComponent, selector: "art-osm-tile-layer", inputs: ["url", "map"] }, { type: FeatureLayerComponent, selector: "art-feature-layer", inputs: ["settings"] }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
3621
|
+
], usesInheritance: true, ngImport: i0__namespace, template: "<ng-content></ng-content>\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"], components: [{ type: OsmTileLayerComponent, selector: "art-osm-tile-layer", inputs: ["url", "opacity", "map"] }, { type: FeatureLayerComponent, selector: "art-feature-layer", inputs: ["settings"] }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
3595
3622
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MapPlateComponent, decorators: [{
|
|
3596
3623
|
type: i0.Component,
|
|
3597
3624
|
args: [{
|