From 6586c78418172161be3223e942238b138b2918ce Mon Sep 17 00:00:00 2001 From: "john.schaap@kadaster.nl" Date: Mon, 11 Mar 2024 14:37:37 +0100 Subject: [PATCH] Begroeide i.p.v begroeid en preview bestuurlijke gebieden nu productie --- .../src/app/demobox/demobox.component.html | 4 +- .../src/app/demobox/demobox.component.ts | 75 ++++++++++--------- .../app/objectinfo/objectinfo.component.ts | 2 + 3 files changed, 42 insertions(+), 39 deletions(-) diff --git a/projects/vectortile-demo/src/app/demobox/demobox.component.html b/projects/vectortile-demo/src/app/demobox/demobox.component.html index 5b05de2..3e14ac0 100644 --- a/projects/vectortile-demo/src/app/demobox/demobox.component.html +++ b/projects/vectortile-demo/src/app/demobox/demobox.component.html @@ -30,7 +30,7 @@

Vectortile Demo Viewer

>{{ demotextVisualisatie }} - Vectortile Demo Viewer [checked]="isPreviewFeature" (click)="DemoPreviewFeaturesToggle()" >Toon preview features - + diff --git a/projects/vectortile-demo/src/app/demobox/demobox.component.ts b/projects/vectortile-demo/src/app/demobox/demobox.component.ts index 842a0cf..6664eb9 100644 --- a/projects/vectortile-demo/src/app/demobox/demobox.component.ts +++ b/projects/vectortile-demo/src/app/demobox/demobox.component.ts @@ -1,8 +1,8 @@ -import { Component, EventEmitter, Output } from '@angular/core'; -import { View } from 'ol'; -import { demoSettings } from '../app.component'; -import { Visualisatie, getRandomEnumValue } from '../enumVisualisatie'; -import { LocationService } from '../location.service'; +import { Component, EventEmitter, Output } from '@angular/core' +import { View } from 'ol' +import { demoSettings } from '../app.component' +import { Visualisatie, getRandomEnumValue } from '../enumVisualisatie' +import { LocationService } from '../location.service' @Component({ selector: 'app-demobox', @@ -21,90 +21,91 @@ export class DemoboxComponent { demotextVisualisatie = this.demotextVisualisatieAan; public get isDemoVisualisatieRotate(): boolean { - return demoSettings.demoVisualisatieRotate; + return demoSettings.demoVisualisatieRotate } public set isDemoVisualisatieRotate(value: boolean) { - demoSettings.demoVisualisatieRotate = value; + demoSettings.demoVisualisatieRotate = value } public get isDemoLocatieRotate(): boolean { - return demoSettings.demoLocatieRotate; + return demoSettings.demoLocatieRotate } public set isDemoLocatieRotate(value: boolean) { - demoSettings.demoLocatieRotate = value; + demoSettings.demoLocatieRotate = value } public get isPreviewFeature(): boolean { - return demoSettings.previewFeature; + return demoSettings.previewFeature + } public set isPreviewFeature(value: boolean) { - demoSettings.previewFeature = value; + demoSettings.previewFeature = value } - constructor(private locationService: LocationService) {} + constructor(private locationService: LocationService) { } ngOnInit(): void { this.locationService.currentLocation.subscribe((currentLocation) => { // this.currentlocation = currentLocation; - }); + }) } DemoPreviewFeaturesToggle() { - this.isPreviewFeature = !this.isPreviewFeature; + this.isPreviewFeature = !this.isPreviewFeature } DemoRandomLocationToggle() { - this.isDemoLocatieRotate = !this.isDemoLocatieRotate; + this.isDemoLocatieRotate = !this.isDemoLocatieRotate if (this.isDemoLocatieRotate) { - this.demotextLocatie = this.demotextLocatieUit; - this.gotoRandomLocation(); + this.demotextLocatie = this.demotextLocatieUit + this.gotoRandomLocation() } else { - this.demotextLocatie = this.demotextLocatieAan; + this.demotextLocatie = this.demotextLocatieAan } } DemogotoStartLocationOnMap() { - this.visEmit.emit(Visualisatie.BGTstandaard); - this.isDemoVisualisatieRotate = false; - this.isDemoLocatieRotate = false; - const newloc = this.locationService.initialView; - this.locationService.changeView(newloc); + this.visEmit.emit(Visualisatie.BGTstandaard) + this.isDemoVisualisatieRotate = false + this.isDemoLocatieRotate = false + const newloc = this.locationService.initialView + this.locationService.changeView(newloc) } DemoVisualisationToggle() { - this.isDemoVisualisatieRotate = !this.isDemoVisualisatieRotate; + this.isDemoVisualisatieRotate = !this.isDemoVisualisatieRotate if (this.isDemoVisualisatieRotate) { - this.demotextVisualisatie = this.demotextVisualisatieUit; + this.demotextVisualisatie = this.demotextVisualisatieUit - this.visEmit.emit(Visualisatie.BGTstandaard); - this.repeating_style_function(); + this.visEmit.emit(Visualisatie.BGTstandaard) + this.repeating_style_function() } else { - this.demotextVisualisatie = this.demotextVisualisatieAan; + this.demotextVisualisatie = this.demotextVisualisatieAan } } gotoRandomLocation() { if (this.isDemoLocatieRotate) { - const dx = 155000 + Math.round(Math.random() * 50000); - const dy = 463000 + Math.round(Math.random() * 50000); + const dx = 155000 + Math.round(Math.random() * 50000) + const dy = 463000 + Math.round(Math.random() * 50000) const newloc = new View({ projection: this.locationService.rdProjection, center: [dx, dy], zoom: 13, enableRotation: false, - }); - this.locationService.changeView(newloc); + }) + this.locationService.changeView(newloc) setTimeout(() => { - this.gotoRandomLocation(); - }, 8000); + this.gotoRandomLocation() + }, 8000) } } repeating_style_function() { if (this.isDemoVisualisatieRotate) { - this.visEmit.emit(getRandomEnumValue(Visualisatie)); + this.visEmit.emit(getRandomEnumValue(Visualisatie)) setTimeout(() => { - this.repeating_style_function(); - }, Math.round(Math.random() * 4000)); + this.repeating_style_function() + }, Math.round(Math.random() * 4000)) } } } diff --git a/projects/vectortile-demo/src/app/objectinfo/objectinfo.component.ts b/projects/vectortile-demo/src/app/objectinfo/objectinfo.component.ts index 1c6a5d6..0a33c83 100644 --- a/projects/vectortile-demo/src/app/objectinfo/objectinfo.component.ts +++ b/projects/vectortile-demo/src/app/objectinfo/objectinfo.component.ts @@ -118,6 +118,7 @@ function getCollection(layer: string): string { layer = layer.replace("deel", "delen") layer = layer.replace("label", "labels") layer = layer.replace("aanduiding", "aanduidingen") + layer = layer.replace("begroeid", "begroeide") switch (layer) { case "pand": { @@ -136,6 +137,7 @@ function getCollection(layer: string): string { + default: { return layer