Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use TransactionZones wms #1598

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/RoadRegistry.BackOffice.UI/.env
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ VUE_APP_WR_ENV=production
VUE_APP_API_VERSION=0.0.0.0
VUE_APP_API_ENDPOINT=https://api.basisregisters.vlaanderen.be
VUE_APP_API_OLDENDPOINT=https://backoffice-api.wegen.vlaanderen.be
VUE_APP_WMS_TRANSACTIONZONES_URL=https://geo.api.vlaanderen.be/WegenregisterBijwerkingszones/wms
VUE_APP_WMS_LAYER_TRANSACTIONZONES=BIJWERKINGSZONES
VUE_APP_WMS_LAYER_OVERLAPPINGTRANSACTIONZONES=OVERLAPPENDE_BIJWERKINGSZONES
VUE_APP_FEATURETOGGLES_USEACMIDM=false
VUE_APP_FEATURETOGGLES_USEDIRECTAPICALLS=false
VUE_APP_FEATURETOGGLES_USETRANSACTIONZONESTAB=false
Expand Down
3 changes: 3 additions & 0 deletions src/RoadRegistry.BackOffice.UI/.env.development
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ VUE_APP_WR_ENV=development
VUE_APP_API_VERSION=0.0.0-dev
VUE_APP_API_ENDPOINT=http://localhost:2080
VUE_APP_API_OLDENDPOINT=http://localhost:10002
VUE_APP_WMS_TRANSACTIONZONES_URL=https://geo.api.test-vlaanderen.be/WegenregisterBijwerkingszonesStaging/wms
VUE_APP_WMS_LAYER_TRANSACTIONZONES=STAGING_BIJWERKINGSZONES
VUE_APP_WMS_LAYER_OVERLAPPINGTRANSACTIONZONES=STAGING_OVERLAPPENDE_BIJWERKINGSZONES
VUE_APP_FEATURETOGGLES_USEACMIDM=true
VUE_APP_FEATURETOGGLES_USEDIRECTAPICALLS=true
VUE_APP_FEATURETOGGLES_USETRANSACTIONZONESTAB=true
Expand Down
3 changes: 3 additions & 0 deletions src/RoadRegistry.BackOffice.UI/.env.staging
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ VUE_APP_WR_ENV=staging
VUE_APP_API_VERSION=0.0.0.0
VUE_APP_API_ENDPOINT=https://api.basisregisters.staging-vlaanderen.be
VUE_APP_API_OLDENDPOINT=https://backoffice-api.wegen.dev-vlaanderen.be
VUE_APP_WMS_TRANSACTIONZONES_URL=https://geo.api.test-vlaanderen.be/WegenregisterBijwerkingszonesStaging/wms
VUE_APP_WMS_LAYER_TRANSACTIONZONES=STAGING_BIJWERKINGSZONES
VUE_APP_WMS_LAYER_OVERLAPPINGTRANSACTIONZONES=STAGING_OVERLAPPENDE_BIJWERKINGSZONES
VUE_APP_FEATURETOGGLES_USEACMIDM=false
VUE_APP_FEATURETOGGLES_USEDIRECTAPICALLS=false
VUE_APP_FEATURETOGGLES_USETRANSACTIONZONESTAB=false
Expand Down
3 changes: 3 additions & 0 deletions src/RoadRegistry.BackOffice.UI/.env.test
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ VUE_APP_WR_ENV=test
VUE_APP_API_VERSION=0.0.0.0
VUE_APP_API_ENDPOINT=https://api.basisregisters.dev-vlaanderen.be
VUE_APP_API_OLDENDPOINT=https://backoffice-api.wegen.test-vlaanderen.be
VUE_APP_WMS_TRANSACTIONZONES_URL=https://geo.api.test-vlaanderen.be/WegenregisterBijwerkingszonesStaging/wms
VUE_APP_WMS_LAYER_TRANSACTIONZONES=STAGING_BIJWERKINGSZONES
VUE_APP_WMS_LAYER_OVERLAPPINGTRANSACTIONZONES=STAGING_OVERLAPPENDE_BIJWERKINGSZONES
VUE_APP_FEATURETOGGLES_USEACMIDM=true
VUE_APP_FEATURETOGGLES_USEDIRECTAPICALLS=true
VUE_APP_FEATURETOGGLES_USETRANSACTIONZONESTAB=true
Expand Down
3 changes: 3 additions & 0 deletions src/RoadRegistry.BackOffice.UI/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ echo "window.WR_ENV = \"${WR_ENV}\"" >> /usr/share/nginx/html/env.js
echo "window.API_VERSION = \"${API_VERSION}\"" >> /usr/share/nginx/html/env.js
echo "window.API_ENDPOINT = \"${API_ENDPOINT}\"" >> /usr/share/nginx/html/env.js
echo "window.API_OLDENDPOINT = \"${API_OLDENDPOINT}\"" >> /usr/share/nginx/html/env.js
echo "window.WMS_TRANSACTIONZONES_URL = \"${WMS_TRANSACTIONZONES_URL}\"" >> /usr/share/nginx/html/env.js
echo "window.WMS_LAYER_TRANSACTIONZONES = \"${WMS_LAYER_TRANSACTIONZONES}\"" >> /usr/share/nginx/html/env.js
echo "window.WMS_LAYER_OVERLAPPINGTRANSACTIONZONES = \"${WMS_LAYER_OVERLAPPINGTRANSACTIONZONES}\"" >> /usr/share/nginx/html/env.js
echo "window.featureToggles = {}" >> /usr/share/nginx/html/env.js

echo "window.featureToggles.useAcmIdm = \"${FeatureToggles__UseAcmIdm}\"" >> /usr/share/nginx/html/env.js
Expand Down
3 changes: 3 additions & 0 deletions src/RoadRegistry.BackOffice.UI/src/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ export const WR_ENV = window.WR_ENV || process.env.VUE_APP_WR_ENV;
export const API_VERSION = window.API_VERSION || process.env.VUE_APP_API_VERSION;
export const API_ENDPOINT = window.API_ENDPOINT || process.env.VUE_APP_API_ENDPOINT;
export const API_OLDENDPOINT = window.API_OLDENDPOINT || process.env.VUE_APP_API_OLDENDPOINT;
export const WMS_TRANSACTIONZONES_URL = window.WMS_TRANSACTIONZONES_URL || process.env.VUE_APP_WMS_TRANSACTIONZONES_URL;
export const WMS_LAYER_TRANSACTIONZONES = window.WMS_LAYER_TRANSACTIONZONES || process.env.VUE_APP_WMS_LAYER_TRANSACTIONZONES;
export const WMS_LAYER_OVERLAPPINGTRANSACTIONZONES = window.WMS_LAYER_OVERLAPPINGTRANSACTIONZONES || process.env.VUE_APP_WMS_LAYER_OVERLAPPINGTRANSACTIONZONES;

export const featureToggles = {
useAcmIdm: `${window.featureToggles?.useAcmIdm ?? process.env.VUE_APP_FEATURETOGGLES_USEACMIDM}` === "true",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,13 @@
<vl-map-tile-wms-source url="https://geo.api.vlaanderen.be/GRB-basiskaart/wms" />
</vl-map-tile-layer>

<vl-map-vector-layer>
<vl-map-vector-source :url="transactionZonesGeoJsonUrl" />
<vl-map-icon-style color="rgba(183, 171, 31, 1)" color-stroke="rgba(183, 171, 31, 1)" />
<vl-map-layer-style data-vl-text-feature-attribute-name="description" />
</vl-map-vector-layer>
<!-- <vl-map-select-interaction @select="onSelectTransactionZone">
<vl-map-icon-style mod-highlight />
</vl-map-select-interaction> -->

<vl-map-vector-layer>
<vl-map-vector-source :url="overlappingTransactionZonesGeoJsonUrl" />
<vl-map-icon-style color="rgba(230, 49, 31, 1)" color-stroke="rgba(230, 49, 31, 1)" />
</vl-map-vector-layer>
<vl-map-tile-layer :opacity="0.8">
<vl-map-tile-wms-source :url="transactionZonesWmsUrl" :layers="[layerTransactionZones]" />
</vl-map-tile-layer>

<vl-map-tile-layer :opacity="0.4">
<vl-map-tile-wms-source :url="transactionZonesWmsUrl" :layers="[layerOverlappingTransactionZones]" />
</vl-map-tile-layer>
</vl-ol-map>
</vl-column>
</vl-grid>
Expand All @@ -32,26 +26,22 @@
<script lang="ts">
import Vue from "vue";
import Map from "ol/Map";
import { BackOfficeApi } from "@/services";
import { WMS_TRANSACTIONZONES_URL, WMS_LAYER_OVERLAPPINGTRANSACTIONZONES, WMS_LAYER_TRANSACTIONZONES } from "@/environment";

export default Vue.extend({
computed: {
olMap(): Map {
return (this.$refs.map as any).olMap as Map;
},
transactionZonesGeoJsonUrl() {
// Do not use PublicApi to avoid response size limit error
return BackOfficeApi.Extracts.getTransactionZonesGeoJsonUrl();
},
overlappingTransactionZonesGeoJsonUrl() {
// Do not use PublicApi to avoid response size limit error
return BackOfficeApi.Extracts.getOverlappingTransactionZonesGeoJsonUrl();
transactionZonesWmsUrl(): string {
return WMS_TRANSACTIONZONES_URL;
},
},
methods: {
onSelectTransactionZone() {
//console.log("onSelectTransactionZone", arguments);
layerOverlappingTransactionZones(): string {
return WMS_LAYER_OVERLAPPINGTRANSACTIONZONES;
},
layerTransactionZones(): string {
return WMS_LAYER_TRANSACTIONZONES;
}
}
});
</script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,6 @@ export const BackOfficeApi = {
const path = `${apiEndpoint}/v1/extracts/overlapping/bycontour`;
const response = await apiClient.post<RoadRegistry.ListOverlappingExtractsResponse>(path, request);
return response.data;
},
getOverlappingTransactionZonesGeoJsonUrl() : String {
return `${directApiEndpoint}/v1/extracts/overlappingtransactionzones.geojson`;
},
getTransactionZonesGeoJsonUrl() : String {
return `${directApiEndpoint}/v1/extracts/transactionzones.geojson`;
}
},
Information: {
Expand Down
6 changes: 0 additions & 6 deletions src/RoadRegistry.BackOffice.UI/src/services/public-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,12 +245,6 @@ export const PublicApi = {
const path = `${apiEndpoint}/v2/wegen/extract/overlapping/percontour`;
const response = await apiClient.post<RoadRegistry.ListOverlappingExtractsResponse>(path, request);
return response.data;
},
getOverlappingTransactionZonesGeoJsonUrl() : String {
return `${directApiEndpoint}/v2/wegen/extract/overlappingtransactionzones.geojson`;
},
getTransactionZonesGeoJsonUrl() : String {
return `${directApiEndpoint}/v2/wegen/extract/transactionzones.geojson`;
}
},
Information: {
Expand Down
6 changes: 6 additions & 0 deletions src/RoadRegistry.BackOffice.UI/src/shims-tsx.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ declare global {
API_VERSION: string;
API_ENDPOINT: string;
API_OLDENDPOINT: string;
WMS_TRANSACTIONZONES_URL: string;
WMS_LAYER_TRANSACTIONZONES: string;
WMS_LAYER_OVERLAPPINGTRANSACTIONZONES: string;
featureToggles: FeatureToggles;
}

Expand All @@ -32,4 +35,7 @@ window.WR_ENV = window.WR_ENV || "development";
window.API_VERSION = window.API_VERSION || "";
window.API_ENDPOINT = window.API_ENDPOINT || "";
window.API_OLDENDPOINT = window.API_OLDENDPOINT || "";
window.WMS_TRANSACTIONZONES_URL = window.WMS_TRANSACTIONZONES_URL || "";
window.WMS_LAYER_TRANSACTIONZONES = window.WMS_LAYER_TRANSACTIONZONES || "";
window.WMS_LAYER_OVERLAPPINGTRANSACTIONZONES = window.WMS_LAYER_OVERLAPPINGTRANSACTIONZONES || "";
window.featureToggles = window.featureToggles || {};
Loading