();
diff --git a/projects/ngx-openlayers/src/lib/sources/source.component.ts b/projects/ngx-openlayers/src/lib/sources/source.component.ts
index e11878a3..7f831185 100644
--- a/projects/ngx-openlayers/src/lib/sources/source.component.ts
+++ b/projects/ngx-openlayers/src/lib/sources/source.component.ts
@@ -1,5 +1,5 @@
import { Input, OnDestroy } from '@angular/core';
-import { Source } from 'ol';
+import Source from 'ol/source/Source';
import { LayerComponent } from '../layers/layer.component';
diff --git a/projects/ngx-openlayers/src/lib/sources/tilewms.component.ts b/projects/ngx-openlayers/src/lib/sources/tilewms.component.ts
index 2c1bc289..88761d57 100644
--- a/projects/ngx-openlayers/src/lib/sources/tilewms.component.ts
+++ b/projects/ngx-openlayers/src/lib/sources/tilewms.component.ts
@@ -2,7 +2,7 @@ import { Component, Host, Input, OnChanges, OnInit, forwardRef, SimpleChanges }
import { LayerTileComponent } from '../layers/layertile.component';
import { SourceComponent } from './source.component';
import { TileWMS } from 'ol/source';
-import { TileGrid } from 'ol/tilegrid';
+import TileGrid from 'ol/tilegrid/TileGrid';
import { LoadFunction } from 'ol/Tile';
@Component({
diff --git a/projects/ngx-openlayers/src/lib/sources/tilewmts.component.ts b/projects/ngx-openlayers/src/lib/sources/tilewmts.component.ts
index de51c365..a1cdadc0 100644
--- a/projects/ngx-openlayers/src/lib/sources/tilewmts.component.ts
+++ b/projects/ngx-openlayers/src/lib/sources/tilewmts.component.ts
@@ -14,8 +14,8 @@ import { LayerTileComponent } from '../layers/layertile.component';
import { SourceComponent } from './source.component';
import { TileGridWMTSComponent } from '../tilegridwmts.component';
import { WMTS } from 'ol/source';
-import { WMTS as TileGridWMTS } from 'ol/tilegrid';
-import { WMTSRequestEncoding } from 'ol/source';
+import TileGridWMTS from 'ol/tilegrid/WMTS';
+import WMTSRequestEncoding from 'ol/source/WMTSRequestEncoding';
import { ProjectionLike } from 'ol/proj';
import { LoadFunction } from 'ol/Tile';
import { TileSourceEvent } from 'ol/source/Tile';
diff --git a/projects/ngx-openlayers/src/lib/sources/utfgrid.component.ts b/projects/ngx-openlayers/src/lib/sources/utfgrid.component.ts
index 3715843c..bf17e301 100644
--- a/projects/ngx-openlayers/src/lib/sources/utfgrid.component.ts
+++ b/projects/ngx-openlayers/src/lib/sources/utfgrid.component.ts
@@ -2,6 +2,7 @@ import { Component, Host, Input, OnInit, forwardRef } from '@angular/core';
import { SourceComponent } from './source.component';
import { LayerTileComponent } from '../layers/layertile.component';
import { UTFGrid } from 'ol/source';
+import { Config } from 'ol/source/TileJSON';
@Component({
selector: 'aol-source-utfgrid',
@@ -10,7 +11,7 @@ import { UTFGrid } from 'ol/source';
})
export class SourceUTFGridComponent extends SourceComponent implements OnInit {
instance: UTFGrid;
- @Input() tileJSON: JSON;
+ @Input() tileJSON: Config;
@Input() url: string;
constructor(@Host() layer: LayerTileComponent) {
diff --git a/projects/ngx-openlayers/src/lib/sources/vectortile.component.ts b/projects/ngx-openlayers/src/lib/sources/vectortile.component.ts
index a6598ab9..e087b4e3 100644
--- a/projects/ngx-openlayers/src/lib/sources/vectortile.component.ts
+++ b/projects/ngx-openlayers/src/lib/sources/vectortile.component.ts
@@ -1,5 +1,5 @@
import { Component, Host, Input, forwardRef, ContentChild, AfterContentInit } from '@angular/core';
-import { VectorTile } from 'ol';
+import { VectorTile } from 'ol/source';
import Feature from 'ol/format/Feature';
import TileGrid from 'ol/tilegrid/TileGrid';
import { LayerVectorTileComponent } from '../layers/layervectortile.component';
diff --git a/projects/ngx-openlayers/src/lib/styles/circle.component.ts b/projects/ngx-openlayers/src/lib/styles/circle.component.ts
index e92d6a87..b2b96ca4 100644
--- a/projects/ngx-openlayers/src/lib/styles/circle.component.ts
+++ b/projects/ngx-openlayers/src/lib/styles/circle.component.ts
@@ -1,5 +1,5 @@
import { Component, Input, Host, AfterContentInit, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
-import { AtlasManager, Circle, Fill, Stroke } from 'ol/style';
+import { Circle, Fill, Stroke } from 'ol/style';
import { StyleComponent } from './style.component';
@Component({
@@ -18,8 +18,6 @@ export class StyleCircleComponent implements AfterContentInit, OnChanges, OnDest
snapToPixel: boolean;
@Input()
stroke: Stroke;
- @Input()
- atlasManager: AtlasManager;
constructor(@Host() private host: StyleComponent) {}
diff --git a/projects/ngx-openlayers/src/lib/styles/icon.component.ts b/projects/ngx-openlayers/src/lib/styles/icon.component.ts
index f794439a..f793fb59 100644
--- a/projects/ngx-openlayers/src/lib/styles/icon.component.ts
+++ b/projects/ngx-openlayers/src/lib/styles/icon.component.ts
@@ -24,7 +24,7 @@ export class StyleIconComponent implements OnInit, OnChanges {
@Input()
crossOrigin: IconOrigin;
@Input()
- img: string;
+ img: HTMLCanvasElement | HTMLImageElement;
@Input()
offset: [number, number];
@Input()
diff --git a/projects/ngx-openlayers/src/lib/styles/stroke.component.ts b/projects/ngx-openlayers/src/lib/styles/stroke.component.ts
index c9194e2f..d45626c2 100644
--- a/projects/ngx-openlayers/src/lib/styles/stroke.component.ts
+++ b/projects/ngx-openlayers/src/lib/styles/stroke.component.ts
@@ -17,11 +17,11 @@ export class StyleStrokeComponent implements OnInit, OnChanges {
@Input()
color: Color | undefined;
@Input()
- lineCap: string | undefined;
+ lineCap: CanvasLineCap | undefined;
@Input()
lineDash: number[] | undefined;
@Input()
- lineJoin: string | undefined;
+ lineJoin: CanvasLineJoin | undefined;
@Input()
miterLimit: number | undefined;
@Input()
diff --git a/projects/ngx-openlayers/src/lib/tilegridwmts.component.ts b/projects/ngx-openlayers/src/lib/tilegridwmts.component.ts
index 5ef6584a..40b21fdc 100644
--- a/projects/ngx-openlayers/src/lib/tilegridwmts.component.ts
+++ b/projects/ngx-openlayers/src/lib/tilegridwmts.component.ts
@@ -22,7 +22,7 @@ export class TileGridWMTSComponent extends TileGridComponent implements OnInit {
@Input()
sizes?: Size[];
@Input()
- tileSizes?: (number | Size)[];
+ tileSizes?: Size[];
@Input()
widths?: number[];
diff --git a/projects/ngx-openlayers/src/lib/view.component.ts b/projects/ngx-openlayers/src/lib/view.component.ts
index 91b80369..12922c69 100644
--- a/projects/ngx-openlayers/src/lib/view.component.ts
+++ b/projects/ngx-openlayers/src/lib/view.component.ts
@@ -1,7 +1,7 @@
import { Component, Input, OnInit, OnChanges, OnDestroy, SimpleChanges, EventEmitter, Output } from '@angular/core';
import View from 'ol/View';
import { MapComponent } from './map.component';
-import { ObjectEvent } from 'ol';
+import { ObjectEvent } from 'ol/Object';
import { Extent } from 'ol/extent';
import { Coordinate } from 'ol/coordinate';
diff --git a/src/app/image-static/image-static.component.ts b/src/app/image-static/image-static.component.ts
index a85b5586..688dbfb4 100644
--- a/src/app/image-static/image-static.component.ts
+++ b/src/app/image-static/image-static.component.ts
@@ -1,6 +1,6 @@
import { Component } from '@angular/core';
import { Extent, getCenter } from 'ol/extent';
-import Projection from 'ol/proj/Projection';
+import Projection, { Options as ProjectionOptions } from 'ol/proj/Projection';
@Component({
selector: 'app-root',
@@ -14,12 +14,12 @@ import Projection from 'ol/proj/Projection';
Current image url:
`,
@@ -47,7 +47,7 @@ export class ImageStaticComponent {
public opacity = 1.0;
extent: Extent = [0, 0, 1024, 968];
- po = {
+ po: ProjectionOptions = {
code: 'xkcd-image',
units: 'pixels',
extent: [0, 0, 1024, 968],
diff --git a/src/app/modify-polygon/modify-polygon.component.ts b/src/app/modify-polygon/modify-polygon.component.ts
index b94974ed..fd88e89f 100644
--- a/src/app/modify-polygon/modify-polygon.component.ts
+++ b/src/app/modify-polygon/modify-polygon.component.ts
@@ -1,5 +1,6 @@
import { Component, OnInit } from '@angular/core';
-import { Feature } from 'ol';
+import { Feature, Polygon } from 'geojson';
+import OLFeature from 'ol/Feature';
import Projection from 'ol/proj/Projection';
import { GeoJSON } from 'ol/format';
@@ -66,7 +67,7 @@ export class ModifyPolygonComponent implements OnInit {
displayProj = new Projection({ code: 'EPSG:3857' });
inputProj = new Projection({ code: 'EPSG:4326' });
- feature: Feature = {
+ feature: Feature = {
geometry: {
coordinates: [
[
@@ -85,10 +86,10 @@ export class ModifyPolygonComponent implements OnInit {
ngOnInit() {}
- modifyEnd(feature: Feature) {
+ modifyEnd(feature: OLFeature) {
this.feature = this.format.writeFeatureObject(feature, {
dataProjection: this.inputProj,
featureProjection: this.displayProj,
- });
+ }) as Feature;
}
}