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 4 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
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
Next Next commit
feat: use TransactionZones wms
rikdepeuter committed Jan 22, 2025
commit dd5e72a31d4c54d8a366ec6e623ceabee128823a
1 change: 1 addition & 0 deletions src/RoadRegistry.BackOffice.UI/.env
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@ 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=https://geo.api.vlaanderen.be/WegenregisterBijwerkingszones/wms
VUE_APP_FEATURETOGGLES_USEACMIDM=false
VUE_APP_FEATURETOGGLES_USEDIRECTAPICALLS=false
VUE_APP_FEATURETOGGLES_USETRANSACTIONZONESTAB=false
1 change: 1 addition & 0 deletions src/RoadRegistry.BackOffice.UI/.env.development
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@ 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=https://geo.api.test-vlaanderen.be/WegenregisterBijwerkingszonesStaging/wms
VUE_APP_FEATURETOGGLES_USEACMIDM=true
VUE_APP_FEATURETOGGLES_USEDIRECTAPICALLS=true
VUE_APP_FEATURETOGGLES_USETRANSACTIONZONESTAB=true
1 change: 1 addition & 0 deletions src/RoadRegistry.BackOffice.UI/.env.staging
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@ 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=https://geo.api.test-vlaanderen.be/WegenregisterBijwerkingszonesStaging/wms
VUE_APP_FEATURETOGGLES_USEACMIDM=false
VUE_APP_FEATURETOGGLES_USEDIRECTAPICALLS=false
VUE_APP_FEATURETOGGLES_USETRANSACTIONZONESTAB=false
1 change: 1 addition & 0 deletions src/RoadRegistry.BackOffice.UI/.env.test
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@ 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=https://geo.api.test-vlaanderen.be/WegenregisterBijwerkingszonesStaging/wms
VUE_APP_FEATURETOGGLES_USEACMIDM=true
VUE_APP_FEATURETOGGLES_USEDIRECTAPICALLS=true
VUE_APP_FEATURETOGGLES_USETRANSACTIONZONESTAB=true
1 change: 1 addition & 0 deletions src/RoadRegistry.BackOffice.UI/init.sh
Original file line number Diff line number Diff line change
@@ -6,6 +6,7 @@ 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 = \"${WMS_TRANSACTIONZONES}\"" >> /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
1 change: 1 addition & 0 deletions src/RoadRegistry.BackOffice.UI/src/environment.ts
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@ 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 = window.WMS_TRANSACTIONZONES || process.env.VUE_APP_WMS_TRANSACTIONZONES;

export const featureToggles = {
useAcmIdm: `${window.featureToggles?.useAcmIdm ?? process.env.VUE_APP_FEATURETOGGLES_USEACMIDM}` === "true",
Original file line number Diff line number Diff line change
@@ -10,19 +10,9 @@
<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>
<vl-map-tile-wms-source :url="transactionZonesWmsUrl" />
</vl-map-tile-layer>
</vl-ol-map>
</vl-column>
</vl-grid>
@@ -32,26 +22,16 @@
<script lang="ts">
import Vue from "vue";
import Map from "ol/Map";
import { BackOfficeApi } from "@/services";
import { WMS_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();
},
},
methods: {
onSelectTransactionZone() {
//console.log("onSelectTransactionZone", arguments);
},
transactionZonesWmsUrl(): string {
return WMS_TRANSACTIONZONES;
}
}
});
</script>
Original file line number Diff line number Diff line change
@@ -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: {
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
@@ -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: {
2 changes: 2 additions & 0 deletions src/RoadRegistry.BackOffice.UI/src/shims-tsx.d.ts
Original file line number Diff line number Diff line change
@@ -22,6 +22,7 @@ declare global {
API_VERSION: string;
API_ENDPOINT: string;
API_OLDENDPOINT: string;
WMS_TRANSACTIONZONES: string;
featureToggles: FeatureToggles;
}

@@ -32,4 +33,5 @@ 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 = window.WMS_TRANSACTIONZONES || "";
window.featureToggles = window.featureToggles || {};

Unchanged files with check annotations Beta

private sealed record RoadSegmentCombination(RoadSegmentFeatureCompareRecord RoadSegment1, RoadSegmentFeatureCompareRecord RoadSegment2)
{
private RoadSegmentCombinationKey? _key;

Check warning on line 279 in src/RoadRegistry.BackOffice/FeatureCompare/Translators/GradeSeparatedJunctionFeatureCompareTranslator.cs

GitHub Actions / Build

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
public RoadSegmentCombinationKey Key => _key ??= new RoadSegmentCombinationKey(RoadSegment1, RoadSegment2);
}
public RoadNodeId? TemporaryStartNodeId { get; }
public IReadOnlyList<RoadSegmentWidthAttribute> Widths { get; }
public bool ConvertedFromOutlined { get; }
private RoadSegmentCategory? _correctedCategory;

Check warning on line 87 in src/RoadRegistry.BackOffice/Core/ModifyRoadSegment.cs

GitHub Actions / Build

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
public void TranslateTo(Messages.AcceptedChange message)
{
public OrganizationId? MaintenanceAuthorityId { get; }
public OrganizationName? MaintenanceAuthorityName { get; }
public RoadSegmentMorphology? Morphology { get; }

Check warning on line 51 in src/RoadRegistry.BackOffice/Core/ModifyRoadSegmentAttributes.cs

GitHub Actions / Build

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
public RoadSegmentStatus? Status { get; }

Check warning on line 52 in src/RoadRegistry.BackOffice/Core/ModifyRoadSegmentAttributes.cs

GitHub Actions / Build

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
public RoadSegmentCategory? Category { get; }

Check warning on line 53 in src/RoadRegistry.BackOffice/Core/ModifyRoadSegmentAttributes.cs

GitHub Actions / Build

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
public RoadSegmentSideAttributes? LeftSide { get; }

Check warning on line 54 in src/RoadRegistry.BackOffice/Core/ModifyRoadSegmentAttributes.cs

GitHub Actions / Build

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
public RoadSegmentSideAttributes? RightSide { get; }

Check warning on line 55 in src/RoadRegistry.BackOffice/Core/ModifyRoadSegmentAttributes.cs

GitHub Actions / Build

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
public RoadSegmentAccessRestriction? AccessRestriction { get; }

Check warning on line 56 in src/RoadRegistry.BackOffice/Core/ModifyRoadSegmentAttributes.cs

GitHub Actions / Build

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
public IReadOnlyList<RoadSegmentLaneAttribute>? Lanes { get; }

Check warning on line 57 in src/RoadRegistry.BackOffice/Core/ModifyRoadSegmentAttributes.cs

GitHub Actions / Build

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
public IReadOnlyList<RoadSegmentSurfaceAttribute>? Surfaces { get; }

Check warning on line 58 in src/RoadRegistry.BackOffice/Core/ModifyRoadSegmentAttributes.cs

GitHub Actions / Build

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
public IReadOnlyList<RoadSegmentWidthAttribute>? Widths { get; }
public void TranslateTo(Messages.AcceptedChange message)