@artstesh/maps 1.1.30 → 1.1.32
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 +19 -2
- package/dist/bundles/maps-components-src-map.umd.js.map +1 -1
- package/dist/bundles/maps-components.umd.js +19 -2
- package/dist/bundles/maps-components.umd.js.map +1 -1
- package/dist/esm2015/map/map-plate/map-plate.component.js +20 -4
- package/dist/esm2015/src/map/map-plate/map-plate.component.js +20 -4
- package/dist/fesm2015/maps-components-src-map.js +19 -3
- package/dist/fesm2015/maps-components-src-map.js.map +1 -1
- package/dist/fesm2015/maps-components.js +19 -3
- package/dist/fesm2015/maps-components.js.map +1 -1
- package/dist/map/map-plate/map-plate.component.d.ts +5 -3
- package/dist/src/map/map-plate/map-plate.component.d.ts +5 -3
- package/package.json +1 -1
|
@@ -3504,6 +3504,7 @@
|
|
|
3504
3504
|
_this.mapFactory = mapFactory;
|
|
3505
3505
|
_this.registrator = registrator;
|
|
3506
3506
|
_this.detector = detector;
|
|
3507
|
+
_this.renderTryCount = 0;
|
|
3507
3508
|
_this.osmUrl = '';
|
|
3508
3509
|
_this.drawingLayerSettings = new FeatureLayerSettings().setName(MapConstants.DrawingLayerId);
|
|
3509
3510
|
_this._settings = new MapSettings();
|
|
@@ -3523,7 +3524,7 @@
|
|
|
3523
3524
|
enumerable: false,
|
|
3524
3525
|
configurable: true
|
|
3525
3526
|
});
|
|
3526
|
-
MapPlateComponent.prototype.
|
|
3527
|
+
MapPlateComponent.prototype.initializeMap = function () {
|
|
3527
3528
|
var _this = this;
|
|
3528
3529
|
proj.useGeographic();
|
|
3529
3530
|
this.map = this.mapFactory.build(this._settings);
|
|
@@ -3538,6 +3539,21 @@
|
|
|
3538
3539
|
});
|
|
3539
3540
|
this.setOsm();
|
|
3540
3541
|
};
|
|
3542
|
+
MapPlateComponent.prototype.ngAfterViewInit = function () {
|
|
3543
|
+
var _this = this;
|
|
3544
|
+
var mapContainer = this.elementRef.nativeElement;
|
|
3545
|
+
var checkContainerSize = function () {
|
|
3546
|
+
var clientWidth = mapContainer.clientWidth, clientHeight = mapContainer.clientHeight;
|
|
3547
|
+
if (clientWidth > 0 && clientHeight > 0) {
|
|
3548
|
+
_this.initializeMap();
|
|
3549
|
+
}
|
|
3550
|
+
else {
|
|
3551
|
+
console.error("Map's container is not rendered yet or has zero size. Trying again in 100 ms.");
|
|
3552
|
+
setTimeout(checkContainerSize, 20 * ++_this.renderTryCount); // Проверка каждые 100 мс
|
|
3553
|
+
}
|
|
3554
|
+
};
|
|
3555
|
+
checkContainerSize();
|
|
3556
|
+
};
|
|
3541
3557
|
MapPlateComponent.prototype.setOsm = function () {
|
|
3542
3558
|
if (!this.map)
|
|
3543
3559
|
return;
|
|
@@ -3559,7 +3575,7 @@
|
|
|
3559
3575
|
FeatureService,
|
|
3560
3576
|
FeatureModificationService,
|
|
3561
3577
|
ControlsService,
|
|
3562
|
-
], 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{
|
|
3578
|
+
], 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 });
|
|
3563
3579
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MapPlateComponent, decorators: [{
|
|
3564
3580
|
type: i0.Component,
|
|
3565
3581
|
args: [{
|
|
@@ -3579,6 +3595,7 @@
|
|
|
3579
3595
|
FeatureModificationService,
|
|
3580
3596
|
ControlsService,
|
|
3581
3597
|
],
|
|
3598
|
+
encapsulation: i0.ViewEncapsulation.None,
|
|
3582
3599
|
}]
|
|
3583
3600
|
}], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: MapPostboyService }, { type: MapPlateFactory }, { type: MessageRegistratorService }, { type: i0__namespace.ChangeDetectorRef }]; }, propDecorators: { settings: [{
|
|
3584
3601
|
type: i0.Input
|