Skip to content

Commit

Permalink
chore: update openlayers to ~6.15.1
Browse files Browse the repository at this point in the history
BREAKING CHANGES:
- `ol` peer dep is now `~6.15.1`
- `DrawInteractionComponent` : input `type` is now of type `Type`
- `SourceImageWMSComponent` : input `serverType` is now of type `ServerType`
- `OverlayComponent` : input `positioning` is now of type `Positioning`
- `SourceTileWMSComponent` : input `projection` is now of type `ProjectionLike` and input `serverType` is now of type `ServerType`
- `SourceTileWMTSComponent` : input `requestEncoding` is now of type `RequestEncoding`
  • Loading branch information
jeremy-eychenne committed Mar 12, 2024
1 parent 5be4690 commit c5e933e
Show file tree
Hide file tree
Showing 10 changed files with 1,344 additions and 1,103 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@angular/platform-browser-dynamic": "^14.3.0",
"@angular/router": "^14.3.0",
"hammerjs": "^2.0.8",
"ol": "~6.13.0",
"ol": "~6.15.1",
"rxjs": "~7.5.0",
"tslib": "^2.5.0",
"zone.js": "~0.11.4"
Expand Down Expand Up @@ -58,7 +58,7 @@
"karma-coverage": "~2.2.0",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.0.0",
"ng-packagr": "^14.2.2",
"ng-packagr": "~14.2.2",
"prettier": "^2.0.3",
"protractor": "~7.0.0",
"ts-node": "~8.3.0",
Expand Down
2 changes: 1 addition & 1 deletion projects/ngx-openlayers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
"peerDependencies": {
"@angular/common": ">=6.0.0 <=14.x.x",
"@angular/core": ">=6.0.0 <=14.x.x",
"ol": "~6.13.0"
"ol": "~6.15.1"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { Vector } from 'ol/source';
import { Style } from 'ol/style';
import { StyleFunction } from 'ol/style/Style';
import { MapComponent } from '../map.component';
import { Type } from 'ol/geom/Geometry';

@Component({
selector: 'aol-interaction-draw',
Expand All @@ -23,7 +24,7 @@ export class DrawInteractionComponent implements OnInit, OnDestroy {
@Input()
snapTolerance?: number;
@Input()
type: string;
type: Type;
@Input()
maxPoints?: number;
@Input()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export class LayerVectorTileComponent extends LayerComponent implements OnInit,
@Input()
renderBuffer: number;
@Input()
renderMode: string;
renderMode: 'hybrid' | 'vector';
/* not marked as optional in the typings */
@Input()
renderOrder: (feature1: Feature, feature2: Feature) => number;
Expand Down
4 changes: 2 additions & 2 deletions projects/ngx-openlayers/src/lib/overlay.component.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Component, ContentChild, Input, OnDestroy, OnInit } from '@angular/core';
import { Overlay } from 'ol';
import { PanOptions } from 'ol/Overlay';
import { PanOptions, Positioning } from 'ol/Overlay';
import { ContentComponent } from './content.component';
import { MapComponent } from './map.component';

Expand All @@ -17,7 +17,7 @@ export class OverlayComponent implements OnInit, OnDestroy {
@Input()
offset: number[];
@Input()
positioning: string;
positioning: Positioning;
@Input()
stopEvent: boolean;
@Input()
Expand Down
9 changes: 5 additions & 4 deletions projects/ngx-openlayers/src/lib/sources/imagewms.component.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import {
Component,
EventEmitter,
forwardRef,
Host,
Input,
OnChanges,
OnInit,
forwardRef,
SimpleChanges,
Output,
EventEmitter,
SimpleChanges,
} from '@angular/core';
import { ImageWMS } from 'ol/source';
import { LayerImageComponent } from '../layers/layerimage.component';
Expand All @@ -16,6 +16,7 @@ import { ProjectionLike } from 'ol/proj';
import { AttributionLike } from 'ol/source/Source';
import { LoadFunction } from 'ol/Image';
import { ImageSourceEvent } from 'ol/source/Image';
import { ServerType } from 'ol/source/wms';

@Component({
selector: 'aol-source-imagewms',
Expand All @@ -30,7 +31,7 @@ export class SourceImageWMSComponent extends SourceComponent implements OnChange
@Input()
hidpi: boolean;
@Input()
serverType: string;
serverType: ServerType;
@Input()
imageLoadFunction?: LoadFunction;
@Input()
Expand Down
8 changes: 5 additions & 3 deletions projects/ngx-openlayers/src/lib/sources/tilewms.component.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { Component, Host, Input, OnChanges, OnInit, SimpleChanges, forwardRef } from '@angular/core';
import { Component, forwardRef, Host, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core';
import { LoadFunction } from 'ol/Tile';
import { TileWMS } from 'ol/source';
import TileGrid from 'ol/tilegrid/TileGrid';
import { LayerTileComponent } from '../layers/layertile.component';
import { SourceComponent } from './source.component';
import { ProjectionLike } from 'ol/proj';
import { ServerType } from 'ol/source/wms';

@Component({
selector: 'aol-source-tilewms',
Expand All @@ -22,11 +24,11 @@ export class SourceTileWMSComponent extends SourceComponent implements OnChanges
@Input()
params: { [key: string]: any };
@Input()
projection: string;
projection: ProjectionLike;
@Input()
reprojectionErrorThreshold: number;
@Input()
serverType: string;
serverType: ServerType;
@Input()
tileGrid: TileGrid;
@Input()
Expand Down
5 changes: 3 additions & 2 deletions projects/ngx-openlayers/src/lib/sources/tilewmts.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import {
Component,
ContentChild,
EventEmitter,
forwardRef,
Host,
Input,
OnChanges,
Output,
SimpleChanges,
forwardRef,
} from '@angular/core';
import { LoadFunction } from 'ol/Tile';
import { ProjectionLike } from 'ol/proj';
Expand All @@ -18,6 +18,7 @@ import WMTSTileGrid from 'ol/tilegrid/WMTS';
import { LayerTileComponent } from '../layers/layertile.component';
import { TileGridWMTSComponent } from '../tilegridwmts.component';
import { SourceComponent } from './source.component';
import { RequestEncoding } from 'ol/source/WMTS';

@Component({
selector: 'aol-source-tilewmts',
Expand All @@ -36,7 +37,7 @@ export class SourceTileWMTSComponent extends SourceComponent implements AfterCon
@Input()
reprojectionErrorThreshold?: number;
@Input()
requestEncoding?: string;
requestEncoding?: RequestEncoding;
@Input()
layer: string;
@Input()
Expand Down
10 changes: 6 additions & 4 deletions projects/ngx-openlayers/src/lib/styles/icon.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ import { Component, Host, Input, OnChanges, OnInit, SimpleChanges } from '@angul
import { Color } from 'ol/color';
import { Size } from 'ol/size';
import { Icon } from 'ol/style';
import IconOrigin from 'ol/style/IconOrigin';
import { StyleComponent } from './style.component';
import { Positioning } from 'ol/Overlay';

@Component({
selector: 'aol-style-icon',
Expand All @@ -12,11 +14,11 @@ export class StyleIconComponent implements OnInit, OnChanges {
@Input()
anchor: [number, number];
@Input()
anchorXUnits: string;
anchorXUnits: 'fraction' | 'pixels';
@Input()
anchorYUnits: string;
anchorYUnits: 'fraction' | 'pixels';
@Input()
anchorOrigin: string;
anchorOrigin: 'bottom-left' | 'bottom-right' | 'top-left' | 'top-right';
@Input()
color: Color;
@Input()
Expand All @@ -26,7 +28,7 @@ export class StyleIconComponent implements OnInit, OnChanges {
@Input()
offset: [number, number];
@Input()
offsetOrigin: string;
offsetOrigin: 'bottom-left' | 'bottom-right' | 'top-left' | 'top-right';
@Input()
opacity: number;
@Input()
Expand Down
Loading

0 comments on commit c5e933e

Please sign in to comment.