Skip to content

Commit ec7f0b5

Browse files
feat: update openlayers to ~6.13.0
BREAKING CHANGE: all components inputs of type `Element` or `Node` are now of type `HTMLElement` BREAKING CHANGE: all `olChangeActive` and `propertyChange` outputs are now `EventEmitter<ObjectEvent>` BREAKING CHANGE: `FormatMVTComponent` : input `featureClass` is now of type `FeatureClass` BREAKING CHANGE: `DragAndDropInteractionComponent` : input `formatConstructors` is now of type `FeatureFormat[]` BREAKING CHANGE: `LayerComponent` : `prerender` and `postrender` inputs functions should now manage events of type `RenderEvent` BREAKING CHANGE: `SourceImageArcGISRestComponent` : `attributions` input is now of type `AttributionLike` BREAKING CHANGE: `SourceTileWMTSComponent` : `tileGrid` input is now of type `WMTSTileGrid` BREAKING CHANGE: `SourceUTFGridComponent` : `tileJSON` input is now of type `Config` BREAKING CHANGE: `StyleCircleComponent` : `snapToPixel` and `atlasManager` have been removed BREAKING CHANGE: `StyleIconComponent` : `img` input is now of type `HTMLImageElement | HTMLCanvasElement` BREAKING CHANGE: `MapComponent` : `prerender` output has been removed, `precompose` output has been added. `olClick`, `dblClick`, `pointerDrag`, `pointerMove`, `singleClick` outputs are now of type `EventEmitter<MapBrowserEvent<UIEvent>>` BREAKING CHANGE: `ViewComponent` : `changeZoom` output has been removed
1 parent 67e4ab0 commit ec7f0b5

39 files changed

+310
-175
lines changed

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"@angular/platform-browser-dynamic": "^14.3.0",
2525
"@angular/router": "^14.3.0",
2626
"hammerjs": "^2.0.8",
27-
"ol": "~6.3.1",
27+
"ol": "~6.13.0",
2828
"rxjs": "~7.5.0",
2929
"tslib": "^2.5.0",
3030
"zone.js": "~0.11.4"
@@ -39,8 +39,10 @@
3939
"@angular/cli": "^14.2.11",
4040
"@angular/compiler-cli": "^14.3.0",
4141
"@angular/language-service": "^14.3.0",
42+
"@types/arcgis-rest-api": "^10.4.5",
4243
"@types/jasmine": "~4.3.1",
4344
"@types/node": "^12.11.1",
45+
"@types/topojson-specification": "^1.0.2",
4446
"@typescript-eslint/eslint-plugin": "^5.36.2",
4547
"@typescript-eslint/parser": "^5.36.2",
4648
"commit-and-tag-version": "^12.0.0",

projects/ngx-openlayers/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
"peerDependencies": {
88
"@angular/common": ">=6.0.0 <=14.x.x",
99
"@angular/core": ">=6.0.0 <=14.x.x",
10-
"ol": "^6.0.0"
10+
"ol": "~6.13.0"
1111
}
1212
}

projects/ngx-openlayers/src/lib/attribution.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ export class AttributionComponent implements OnInit {
1313

1414
ngOnInit() {
1515
this.html = this.elementRef.nativeElement.innerHTML;
16-
this.instance = new Attribution(this);
16+
this.instance = new Attribution();
1717
}
1818
}

projects/ngx-openlayers/src/lib/attributions.component.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { AfterViewInit, Component, ContentChildren, Host, QueryList } from '@angular/core';
2-
import { Attribution } from 'ol/control';
32
import { AttributionComponent } from './attribution.component';
43
import { SourceComponent } from './sources/source.component';
54

@@ -11,14 +10,14 @@ export class AttributionsComponent implements AfterViewInit {
1110
@ContentChildren(AttributionComponent)
1211
attributions: QueryList<AttributionComponent>;
1312

14-
instance: Array<Attribution>;
13+
instance: Array<string>;
1514

1615
constructor(@Host() private source: SourceComponent) {}
1716

1817
/* we can do this at the very end */
1918
ngAfterViewInit() {
2019
if (this.attributions.length) {
21-
this.instance = this.attributions.map((cmp) => cmp.instance);
20+
this.instance = this.attributions.map((cmp) => cmp.html);
2221
// console.log('setting attributions:', this.instance);
2322
this.source.instance.setAttributions(this.instance);
2423
}

projects/ngx-openlayers/src/lib/controls/attribution.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export class ControlAttributionComponent implements OnInit, OnDestroy {
1212

1313
componentType = 'control';
1414
instance: Attribution;
15-
target: Element;
15+
target: HTMLElement;
1616

1717
constructor(private map: MapComponent, private element: ElementRef) {}
1818

projects/ngx-openlayers/src/lib/controls/control.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export class ControlComponent implements OnInit, OnDestroy {
1313

1414
componentType = 'control';
1515
instance: Control;
16-
element: Element;
16+
element: HTMLElement;
1717

1818
constructor(private map: MapComponent) {}
1919

projects/ngx-openlayers/src/lib/controls/mouseposition.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export class ControlMousePositionComponent implements OnInit, OnDestroy {
1313
coordinateFormat: CoordinateFormat;
1414
@Input()
1515
projection: ProjectionLike;
16-
target: Element;
16+
target: HTMLElement;
1717

1818
instance: MousePosition;
1919

projects/ngx-openlayers/src/lib/controls/overviewmap.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export class ControlOverviewMapComponent implements OnInit, OnChanges, OnDestroy
2020
@Input()
2121
layers: Layer[];
2222
@Input()
23-
target: Element;
23+
target: HTMLElement;
2424
@Input()
2525
tipLabel: string;
2626
@Input()

projects/ngx-openlayers/src/lib/controls/zoom.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ export class ControlZoomComponent implements OnInit, OnDestroy {
1010
@Input()
1111
duration: number;
1212
@Input()
13-
zoomInLabel: string | Node;
13+
zoomInLabel: string | HTMLElement;
1414
@Input()
15-
zoomOutLabel: string | Node;
15+
zoomOutLabel: string | HTMLElement;
1616
@Input()
1717
zoomInTipLabel: string;
1818
@Input()

projects/ngx-openlayers/src/lib/controls/zoomtoextent.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export class ControlZoomToExtentComponent implements OnInit, OnDestroy {
1111
@Input()
1212
className: string;
1313
@Input()
14-
label: string | Node;
14+
label: string | HTMLElement;
1515
@Input()
1616
tipLabel: string;
1717
@Input()

0 commit comments

Comments
 (0)