From d2b8de17d121e2002faf753b357719fb62d27325 Mon Sep 17 00:00:00 2001 From: Willem Dantuma Date: Tue, 26 Jan 2021 09:12:37 +0100 Subject: [PATCH] Fix hover and select remove @Host() --- package-lock.json | 6 +++--- package.json | 2 +- .../components/aol/gps-location/gps-location.component.ts | 2 +- .../components/aol/item-layers/item-layers.component.ts | 2 +- .../aol/item-vector-source/item-vector-source.component.ts | 7 ++++++- .../aol/rotation-reset/rotation-reset.component.ts | 2 +- projects/common-map/src/fm-map/effects/map.effects.ts | 6 ++++++ .../components/olcs/switch2d3d/switch2d3d.component.ts | 2 +- src/configuration.json | 4 ++-- 9 files changed, 22 insertions(+), 11 deletions(-) diff --git a/package-lock.json b/package-lock.json index 670ce55..ff0df05 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8361,9 +8361,9 @@ "integrity": "sha512-6YHXtdXkGH3w0NQoaUgNYAcrj064Lv5RTO284ha/hvpNTrh55yQz2cVh0VvwBk3MjyY2tdmLH4SuCJDszYdYiw==" }, "ngx-openlayers": { - "version": "1.0.0-next.16", - "resolved": "https://registry.npmjs.org/ngx-openlayers/-/ngx-openlayers-1.0.0-next.16.tgz", - "integrity": "sha512-GzNCyjj72AHEcmf8oT6SDSZLYBwKBJwRebMv1SgPdY4gsoQ/dbpqY7nmjX8k8kuQoVQQxt7UyIak3tcNYbOKVQ==" + "version": "1.0.0-next.17", + "resolved": "https://registry.npmjs.org/ngx-openlayers/-/ngx-openlayers-1.0.0-next.17.tgz", + "integrity": "sha512-Kqw056VIgolpiLsf8xPWlkHyKKCa4vh9ORzWCo6c1KvvYxVWriofidnOIzJZ4q768iE+hNgt9ERRI+DexoPFwg==" }, "ngx-uploadx": { "version": "3.5.2", diff --git a/package.json b/package.json index d942cf2..7910c47 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "core-js": "^2.6.11", "ngrx-store-localstorage": "^10.0", "ngx-bootstrap": "^5.6.1", - "ngx-openlayers": "1.0.0-next.16", + "ngx-openlayers": "1.0.0-next.17", "ngx-uploadx": "^3.5.1", "ol": "6.4.3", "ol-cesium": "^2.11.3", diff --git a/projects/common-map/src/fm-map/components/aol/gps-location/gps-location.component.ts b/projects/common-map/src/fm-map/components/aol/gps-location/gps-location.component.ts index 1428028..7d084b9 100644 --- a/projects/common-map/src/fm-map/components/aol/gps-location/gps-location.component.ts +++ b/projects/common-map/src/fm-map/components/aol/gps-location/gps-location.component.ts @@ -26,7 +26,7 @@ export class GpsLocation implements OnInit,OnChanges{ initialized:boolean = false; @ViewChild('location', { static: true }) locationElement: ElementRef; - constructor(@Host() private map: MapComponent) { + constructor(private map: MapComponent) { } diff --git a/projects/common-map/src/fm-map/components/aol/item-layers/item-layers.component.ts b/projects/common-map/src/fm-map/components/aol/item-layers/item-layers.component.ts index 0d49d9f..89aee79 100644 --- a/projects/common-map/src/fm-map/components/aol/item-layers/item-layers.component.ts +++ b/projects/common-map/src/fm-map/components/aol/item-layers/item-layers.component.ts @@ -36,7 +36,7 @@ export class ItemLayersComponent extends LayerGroupComponent implements OnChange private selectedFeatures = {}; private selectionLayer:Layer = null; - constructor(private itemService: ItemService, @Host() private map: MapComponent, public appConfig: AppConfig) { + constructor(private itemService: ItemService, private map: MapComponent, public appConfig: AppConfig) { super(map); this._apiEndPoint = appConfig.getConfig("apiEndPoint"); } diff --git a/projects/common-map/src/fm-map/components/aol/item-vector-source/item-vector-source.component.ts b/projects/common-map/src/fm-map/components/aol/item-vector-source/item-vector-source.component.ts index fdb582e..69e725d 100644 --- a/projects/common-map/src/fm-map/components/aol/item-vector-source/item-vector-source.component.ts +++ b/projects/common-map/src/fm-map/components/aol/item-vector-source/item-vector-source.component.ts @@ -38,7 +38,7 @@ export class ItemVectorSourceComponent extends SourceVectorComponent implements @Output() onFeatureHover: EventEmitter = new EventEmitter(); private stylesCache:IStyles = {}; - constructor(@Host() private layer: LayerVectorComponent, private itemService: ItemService, @Host() private map: MapComponent, private itemTypeService: ItemTypeService,private featureIconService$:FeatureIconService) { + constructor(@Host() private layer: LayerVectorComponent, private itemService: ItemService, private map: MapComponent, private itemTypeService: ItemTypeService,private featureIconService$:FeatureIconService) { super(layer); this._format = new GeoJSON(); } @@ -116,6 +116,8 @@ export class ItemVectorSourceComponent extends SourceVectorComponent implements if (!this.stylesCache[key]) { if (this.itemTypeService.itemTypes[key]) { let itemType = this.itemTypeService.itemTypes[key]; + let fillColor = color.asArray(itemType.iconColor); + fillColor[3] = 0; this.stylesCache[key] = new style.Style({ image: itemType.icon ? new style.Icon({ anchor: [0.5, 1], @@ -126,6 +128,9 @@ export class ItemVectorSourceComponent extends SourceVectorComponent implements color: 'red', width: 1 }), + fill: new style.Fill({ + color: fillColor + }), geometry:(feature) => this.geometry(feature) }); } else { diff --git a/projects/common-map/src/fm-map/components/aol/rotation-reset/rotation-reset.component.ts b/projects/common-map/src/fm-map/components/aol/rotation-reset/rotation-reset.component.ts index f4234e4..4d112fb 100644 --- a/projects/common-map/src/fm-map/components/aol/rotation-reset/rotation-reset.component.ts +++ b/projects/common-map/src/fm-map/components/aol/rotation-reset/rotation-reset.component.ts @@ -29,7 +29,7 @@ export class RotationResetComponent implements OnInit { }); } - constructor( @Host() private map: MapComponent, private changeDetectorRef$: ChangeDetectorRef ) { + constructor( private map: MapComponent, private changeDetectorRef$: ChangeDetectorRef ) { } handleClick(event:Event) { diff --git a/projects/common-map/src/fm-map/effects/map.effects.ts b/projects/common-map/src/fm-map/effects/map.effects.ts index f6d2194..a0f1c85 100644 --- a/projects/common-map/src/fm-map/effects/map.effects.ts +++ b/projects/common-map/src/fm-map/effects/map.effects.ts @@ -64,6 +64,9 @@ export class MapEffects { stroke: new style.Stroke({ color: 'red', width: 1 + }), + fill: new style.Fill({ + color: 'rgba(0, 0, 0,0)' }) }))); actions.push(new mapActions.SetStyle('selected',new style.Style({ @@ -75,6 +78,9 @@ export class MapEffects { stroke: new style.Stroke({ color: 'red', width: 3 + }), + fill: new style.Fill({ + color: 'rgba(0, 0, 0, 0)' }) }))); diff --git a/projects/common-map3d/src/fm-map3d/components/olcs/switch2d3d/switch2d3d.component.ts b/projects/common-map3d/src/fm-map3d/components/olcs/switch2d3d/switch2d3d.component.ts index d89a80e..57b66f0 100644 --- a/projects/common-map3d/src/fm-map3d/components/olcs/switch2d3d/switch2d3d.component.ts +++ b/projects/common-map3d/src/fm-map3d/components/olcs/switch2d3d/switch2d3d.component.ts @@ -17,7 +17,7 @@ export class Switch2D3DComponent { private synchronizers:any[]; - constructor(@Host() private map: MapComponent) { + constructor(private map: MapComponent) { } diff --git a/src/configuration.json b/src/configuration.json index c38ec06..61c0dff 100644 --- a/src/configuration.json +++ b/src/configuration.json @@ -1,9 +1,9 @@ { "issuer": "https://accounts.test.farmmaps.eu", "clientId": "farmmapsdev", - "audience": "http://localhost:8082", + "audience": "https://test.farmmaps.eu", "requireHttps": true, - "apiEndPoint": "http://localhost:8082", + "apiEndPoint": "https://test.farmmaps.eu", "grantType":"code" } \ No newline at end of file