Skip to content

Commit 12bfb21

Browse files
feat: update openlayers to ~6.15.1
BREAKING CHANGE: `ol` peer dep is now `~6.15.1` BREAKING CHANGE: `DrawInteractionComponent` : input `type` is now of type `Type` BREAKING CHANGE: `SourceImageWMSComponent` : input `serverType` is now of type `ServerType` BREAKING CHANGE: `OverlayComponent` : input `positioning` is now of type `Positioning` BREAKING CHANGE: `SourceTileWMSComponent` : input `projection` is now of type `ProjectionLike` and input `serverType` is now of type `ServerType` BREAKING CHANGE: `SourceTileWMTSComponent` : input `requestEncoding` is now of type `RequestEncoding`
1 parent 2ce2dfc commit 12bfb21

File tree

15 files changed

+1158
-1118
lines changed

15 files changed

+1158
-1118
lines changed

.eslintrc.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"plugin:@angular-eslint/template/process-inline-templates"
2222
],
2323
"rules": {
24+
"jsdoc/newline-after-description": "off",
2425
"@angular-eslint/component-selector": [
2526
"error",
2627
{
@@ -43,6 +44,14 @@
4344
"accessibility": "explicit"
4445
}
4546
],
47+
"@typescript-eslint/naming-convention": [
48+
"error",
49+
{
50+
"selector": "objectLiteralProperty",
51+
"leadingUnderscore": "allow",
52+
"format": ["camelCase", "PascalCase", "snake_case", "UPPER_CASE"]
53+
}
54+
],
4655
"arrow-parens": [
4756
"off",
4857
"always"

documentation/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ property of the source as they would otherwise appear multiple times.
113113

114114
```html
115115
<aol-layer-vectortile
116-
[renderMode]="'vector'"
116+
[renderMode]="VectorTileRenderType.VECTOR"
117117
[maxResolution]="312"
118118
[style]="myStyle"
119119
[zIndex]="20"

package.json

Lines changed: 4 additions & 4 deletions
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.13.0",
27+
"ol": "~6.15.1",
2828
"rxjs": "~7.5.0",
2929
"tslib": "^2.5.0",
3030
"zone.js": "~0.11.4"
@@ -45,10 +45,10 @@
4545
"@types/topojson-specification": "^1.0.2",
4646
"@typescript-eslint/eslint-plugin": "^5.36.2",
4747
"@typescript-eslint/parser": "^5.36.2",
48-
"commit-and-tag-version": "^12.0.0",
48+
"commit-and-tag-version": "^11.3.0",
4949
"eslint": "^8.23.0",
5050
"eslint-plugin-import": "latest",
51-
"eslint-plugin-jsdoc": "latest",
51+
"eslint-plugin-jsdoc": "^47.0.2",
5252
"eslint-plugin-prefer-arrow": "latest",
5353
"improved-yarn-audit": "^3.0.0",
5454
"jasmine-core": "~4.3.0",
@@ -58,7 +58,7 @@
5858
"karma-coverage": "~2.2.0",
5959
"karma-jasmine": "~5.1.0",
6060
"karma-jasmine-html-reporter": "~2.0.0",
61-
"ng-packagr": "^14.2.2",
61+
"ng-packagr": "~14.2.2",
6262
"prettier": "^2.0.3",
6363
"protractor": "~7.0.0",
6464
"ts-node": "~8.3.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.13.0"
10+
"ol": "~6.15.1"
1111
}
1212
}

projects/ngx-openlayers/src/lib/interactions/draw.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { Vector } from 'ol/source';
88
import { Style } from 'ol/style';
99
import { StyleFunction } from 'ol/style/Style';
1010
import { MapComponent } from '../map.component';
11+
import { Type } from 'ol/geom/Geometry';
1112

1213
@Component({
1314
selector: 'aol-interaction-draw',
@@ -23,7 +24,7 @@ export class DrawInteractionComponent implements OnInit, OnDestroy {
2324
@Input()
2425
snapTolerance?: number;
2526
@Input()
26-
type: string;
27+
type: Type;
2728
@Input()
2829
maxPoints?: number;
2930
@Input()

projects/ngx-openlayers/src/lib/layers/layervectortile.component.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ import { StyleFunction } from 'ol/style/Style';
66
import { MapComponent } from '../map.component';
77
import { LayerComponent } from './layer.component';
88
import { LayerGroupComponent } from './layergroup.component';
9+
import VectorTileRenderType from 'ol/layer/VectorTileRenderType';
10+
11+
type VectorTileRenderType = typeof VectorTileRenderType;
912

1013
@Component({
1114
selector: 'aol-layer-vectortile',
@@ -15,7 +18,7 @@ export class LayerVectorTileComponent extends LayerComponent implements OnInit,
1518
@Input()
1619
renderBuffer: number;
1720
@Input()
18-
renderMode: string;
21+
renderMode: VectorTileRenderType;
1922
/* not marked as optional in the typings */
2023
@Input()
2124
renderOrder: (feature1: Feature, feature2: Feature) => number;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Component, ContentChild, Input, OnDestroy, OnInit } from '@angular/core';
22
import { Overlay } from 'ol';
3-
import { PanOptions } from 'ol/Overlay';
3+
import { PanOptions, Positioning } from 'ol/Overlay';
44
import { ContentComponent } from './content.component';
55
import { MapComponent } from './map.component';
66

@@ -17,7 +17,7 @@ export class OverlayComponent implements OnInit, OnDestroy {
1717
@Input()
1818
offset: number[];
1919
@Input()
20-
positioning: string;
20+
positioning: Positioning;
2121
@Input()
2222
stopEvent: boolean;
2323
@Input()

projects/ngx-openlayers/src/lib/sources/imagewms.component.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import {
22
Component,
3+
EventEmitter,
4+
forwardRef,
35
Host,
46
Input,
57
OnChanges,
68
OnInit,
7-
forwardRef,
8-
SimpleChanges,
99
Output,
10-
EventEmitter,
10+
SimpleChanges,
1111
} from '@angular/core';
1212
import { ImageWMS } from 'ol/source';
1313
import { LayerImageComponent } from '../layers/layerimage.component';
@@ -16,6 +16,7 @@ import { ProjectionLike } from 'ol/proj';
1616
import { AttributionLike } from 'ol/source/Source';
1717
import { LoadFunction } from 'ol/Image';
1818
import { ImageSourceEvent } from 'ol/source/Image';
19+
import { ServerType } from 'ol/source/wms';
1920

2021
@Component({
2122
selector: 'aol-source-imagewms',
@@ -30,7 +31,7 @@ export class SourceImageWMSComponent extends SourceComponent implements OnChange
3031
@Input()
3132
hidpi: boolean;
3233
@Input()
33-
serverType: string;
34+
serverType: ServerType;
3435
@Input()
3536
imageLoadFunction?: LoadFunction;
3637
@Input()

projects/ngx-openlayers/src/lib/sources/tilewms.component.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
import { Component, Host, Input, OnChanges, OnInit, SimpleChanges, forwardRef } from '@angular/core';
1+
import { Component, forwardRef, Host, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core';
22
import { LoadFunction } from 'ol/Tile';
33
import { TileWMS } from 'ol/source';
44
import TileGrid from 'ol/tilegrid/TileGrid';
55
import { LayerTileComponent } from '../layers/layertile.component';
66
import { SourceComponent } from './source.component';
7+
import { ProjectionLike } from 'ol/proj';
8+
import { ServerType } from 'ol/source/wms';
79

810
@Component({
911
selector: 'aol-source-tilewms',
@@ -22,11 +24,11 @@ export class SourceTileWMSComponent extends SourceComponent implements OnChanges
2224
@Input()
2325
params: { [key: string]: any };
2426
@Input()
25-
projection: string;
27+
projection: ProjectionLike;
2628
@Input()
2729
reprojectionErrorThreshold: number;
2830
@Input()
29-
serverType: string;
31+
serverType: ServerType;
3032
@Input()
3133
tileGrid: TileGrid;
3234
@Input()

projects/ngx-openlayers/src/lib/sources/tilewmts.component.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ import {
33
Component,
44
ContentChild,
55
EventEmitter,
6+
forwardRef,
67
Host,
78
Input,
89
OnChanges,
910
Output,
1011
SimpleChanges,
11-
forwardRef,
1212
} from '@angular/core';
1313
import { LoadFunction } from 'ol/Tile';
1414
import { ProjectionLike } from 'ol/proj';
@@ -18,6 +18,7 @@ import WMTSTileGrid from 'ol/tilegrid/WMTS';
1818
import { LayerTileComponent } from '../layers/layertile.component';
1919
import { TileGridWMTSComponent } from '../tilegridwmts.component';
2020
import { SourceComponent } from './source.component';
21+
import { RequestEncoding } from 'ol/source/WMTS';
2122

2223
@Component({
2324
selector: 'aol-source-tilewmts',
@@ -36,7 +37,7 @@ export class SourceTileWMTSComponent extends SourceComponent implements AfterCon
3637
@Input()
3738
reprojectionErrorThreshold?: number;
3839
@Input()
39-
requestEncoding?: string;
40+
requestEncoding?: RequestEncoding;
4041
@Input()
4142
layer: string;
4243
@Input()

0 commit comments

Comments
 (0)