From a98aaaa0d0eb58682957b9561a1e2bc73bc58e0c Mon Sep 17 00:00:00 2001 From: drekss Date: Fri, 28 Feb 2020 15:09:54 -0500 Subject: [PATCH 1/3] tile watcher added to vectortile layer --- packages/geo/src/lib/layer/shared/layers/vectortile-layer.ts | 5 +++++ packages/geo/src/lib/layer/utils/tile-watcher.ts | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/geo/src/lib/layer/shared/layers/vectortile-layer.ts b/packages/geo/src/lib/layer/shared/layers/vectortile-layer.ts index d950cca00e..836bdb7c8c 100644 --- a/packages/geo/src/lib/layer/shared/layers/vectortile-layer.ts +++ b/packages/geo/src/lib/layer/shared/layers/vectortile-layer.ts @@ -5,14 +5,19 @@ import { MVTDataSource } from '../../../datasource/shared/datasources/mvt-dataso import { Layer } from './layer'; import { VectorTileLayerOptions } from './vectortile-layer.interface'; +import { TileWatcher } from '../../utils'; export class VectorTileLayer extends Layer { public dataSource: MVTDataSource; public options: VectorTileLayerOptions; public ol: olLayerVectorTile; + private watcher: TileWatcher; + constructor(options: VectorTileLayerOptions) { super(options); + this.watcher = new TileWatcher(this); + this.status$ = this.watcher.status$; } protected createOlLayer(): olLayerVectorTile { diff --git a/packages/geo/src/lib/layer/utils/tile-watcher.ts b/packages/geo/src/lib/layer/utils/tile-watcher.ts index 651c18fc8f..008d53a10c 100644 --- a/packages/geo/src/lib/layer/utils/tile-watcher.ts +++ b/packages/geo/src/lib/layer/utils/tile-watcher.ts @@ -2,6 +2,7 @@ import olSourceTile from 'ol/source/Tile'; import { uuid, Watcher, SubjectStatus } from '@igo2/utils'; import { TileLayer } from '../shared/layers/tile-layer'; +import { VectorTileLayer } from '../shared/layers/vectortile-layer'; export class TileWatcher extends Watcher { private id: string; @@ -10,7 +11,7 @@ export class TileWatcher extends Watcher { private source: olSourceTile; - constructor(layer: TileLayer) { + constructor(layer: TileLayer | VectorTileLayer) { super(); this.source = layer.options.source.ol; this.id = uuid(); From 8b4d24d4cf250e7eae91852672461f0820299200 Mon Sep 17 00:00:00 2001 From: "dereck.lynch" Date: Tue, 3 Mar 2020 10:02:08 -0500 Subject: [PATCH 2/3] fix export network-ionic --- packages/core/src/lib/network/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/core/src/lib/network/index.ts b/packages/core/src/lib/network/index.ts index d4d4cf3284..d260d1dd62 100644 --- a/packages/core/src/lib/network/index.ts +++ b/packages/core/src/lib/network/index.ts @@ -1,2 +1,3 @@ export * from './network.service'; +export * from './network-ionic.service'; export * from './network.interfaces'; From 7684f01e9196dcb702d6c0340ec6563d14d1668e Mon Sep 17 00:00:00 2001 From: "dereck.lynch" Date: Wed, 4 Mar 2020 09:35:36 -0500 Subject: [PATCH 3/3] remove networkionic import --- packages/core/src/lib/network/index.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/core/src/lib/network/index.ts b/packages/core/src/lib/network/index.ts index d260d1dd62..d4d4cf3284 100644 --- a/packages/core/src/lib/network/index.ts +++ b/packages/core/src/lib/network/index.ts @@ -1,3 +1,2 @@ export * from './network.service'; -export * from './network-ionic.service'; export * from './network.interfaces';