From 7bc23e86bf2f520505177faa35f5751aed554636 Mon Sep 17 00:00:00 2001 From: mahmoudadel54 Date: Thu, 22 Feb 2024 10:54:35 +0200 Subject: [PATCH] #9830: Support for IFC 3d model in MS - indicate the projection code into the warning popup in case adding ifc model with non-supported projection --- web/client/api/Model.js | 8 ++++---- web/client/epics/catalog.js | 11 +++++++---- web/client/translations/data.de-DE.json | 2 +- web/client/translations/data.en-US.json | 2 +- web/client/translations/data.es-ES.json | 2 +- web/client/translations/data.fr-FR.json | 2 +- web/client/translations/data.it-IT.json | 2 +- 7 files changed, 16 insertions(+), 13 deletions(-) diff --git a/web/client/api/Model.js b/web/client/api/Model.js index 1d805a9347..2244c6caed 100644 --- a/web/client/api/Model.js +++ b/web/client/api/Model.js @@ -224,10 +224,10 @@ export const getCapabilities = (url) => { // todo: getting bbox needs to enhance to get the accurate bbox of the ifc model let bbox = { bounds: { - minx: properties.longitude || 0 - 0.001, - miny: properties.latitude || 0 - 0.001, - maxx: properties.longitude || 0 + 0.001, - maxy: properties.latitude || 0 + 0.001 + minx: (properties.longitude || 0) - 0.001, + miny: (properties.latitude || 0) - 0.001, + maxx: (properties.longitude || 0) + 0.001, + maxy: (properties.latitude || 0) + 0.001 }, crs: 'EPSG:4326' }; diff --git a/web/client/epics/catalog.js b/web/client/epics/catalog.js index 90b2cfa219..18905d8a12 100644 --- a/web/client/epics/catalog.js +++ b/web/client/epics/catalog.js @@ -301,10 +301,10 @@ export default (API) => ({ ...layer, bbox: { bounds: { - minx: longitude || 0 - 0.001, - miny: latitude || 0 - 0.001, - maxx: longitude || 0 + 0.001, - maxy: latitude || 0 + 0.001 + minx: (longitude || 0) - 0.001, + miny: (latitude || 0) - 0.001, + maxx: (longitude || 0) + 0.001, + maxy: (latitude || 0) + 0.001 }, crs: 'EPSG:4326' }, @@ -324,6 +324,9 @@ export default (API) => ({ title: "notification.warning", message: properties?.projectedCrsNotSupported ? "layerProperties.modelLayer.warnings.projectedCrsNotSupported" : "layerProperties.modelLayer.warnings.projectedCrsNotProvided", autoDismiss: 15, + values: { + modelProjection: properties?.projectedCrsNotSupported ? `(${properties?.projectedCrs})` : "" + }, position: "tc" })] ); diff --git a/web/client/translations/data.de-DE.json b/web/client/translations/data.de-DE.json index 80750918c8..946585234a 100644 --- a/web/client/translations/data.de-DE.json +++ b/web/client/translations/data.de-DE.json @@ -179,7 +179,7 @@ "height": "Höhe (m)", "heading": "Kurswinkel (DD)", "warnings": { - "projectedCrsNotSupported": "Das Modell wird aus folgenden Gründen in der Mitte der aktuellen Ansicht platziert: Das Modell verfügt über eine CRS-Projektion, diese wird jedoch nicht unterstützt.", + "projectedCrsNotSupported": "Das Modell wird aus folgenden Gründen in der Mitte der aktuellen Ansicht platziert: Das Modell verfügt über eine CRS-Projektion {modelProjection}, diese wird jedoch nicht unterstützt.", "projectedCrsNotProvided": "Das Modell wird aus folgenden Gründen in der Mitte der aktuellen Ansicht platziert: Das Modell verfügt über keine definierte CRS-Projektion." } }, diff --git a/web/client/translations/data.en-US.json b/web/client/translations/data.en-US.json index 7bbfd5bb2b..0d41df748f 100644 --- a/web/client/translations/data.en-US.json +++ b/web/client/translations/data.en-US.json @@ -179,7 +179,7 @@ "height": "Height (m)", "heading": "Heading (DD)", "warnings": { - "projectedCrsNotSupported": "The model is placed on the center of the current view because: the model has a CRS projection but it is not supported.", + "projectedCrsNotSupported": "The model is placed on the center of the current view because: the model has a CRS projection {modelProjection} but it is not supported.", "projectedCrsNotProvided": "The model is placed on the center of the current view because: the model has no defined CRS projection." } }, diff --git a/web/client/translations/data.es-ES.json b/web/client/translations/data.es-ES.json index 79c16ed9a0..4c65232477 100644 --- a/web/client/translations/data.es-ES.json +++ b/web/client/translations/data.es-ES.json @@ -176,7 +176,7 @@ "height": "Altura (m)", "heading": "Ángulo de rumbo (DD)", "warnings": { - "projectedCrsNotSupported": "El modelo se coloca en el centro de la vista actual porque: el modelo tiene una proyección CRS pero no es soportado", + "projectedCrsNotSupported": "El modelo se coloca en el centro de la vista actual porque: el modelo tiene una proyección CRS {modelProjection} pero no es soportado", "projectedCrsNotProvided": "El modelo se coloca en el centro de la vista actual porque: el modelo no tiene una proyección CRS definida." } }, diff --git a/web/client/translations/data.fr-FR.json b/web/client/translations/data.fr-FR.json index 63bdf30a0e..a40f266dce 100644 --- a/web/client/translations/data.fr-FR.json +++ b/web/client/translations/data.fr-FR.json @@ -179,7 +179,7 @@ "height": "Hauteur (m)", "heading": "Angle de cap (DD)", "warnings": { - "projectedCrsNotSupported": "Le modèle est placé au centre de la vue actuelle car: le modèle a une projection CRS, mais elle n'est pas prise en charge.", + "projectedCrsNotSupported": "Le modèle est placé au centre de la vue actuelle car: le modèle a une projection CRS {modelProjection}, mais elle n'est pas prise en charge.", "projectedCrsNotProvided": "Le modèle est placé au centre de la vue actuelle car: le modèle n'a pas de projection CRS définie." } }, diff --git a/web/client/translations/data.it-IT.json b/web/client/translations/data.it-IT.json index 778c8d4003..9336bddffa 100644 --- a/web/client/translations/data.it-IT.json +++ b/web/client/translations/data.it-IT.json @@ -179,7 +179,7 @@ "height": "Altezza (m)", "heading": "Angolo di rotta (DD)", "warnings": { - "projectedCrsNotSupported": "Il modello è posizionato al centro della vista corrente perché: il modello ha una proiezione CRS, ma non è supportata.", + "projectedCrsNotSupported": "Il modello è posizionato al centro della vista corrente perché: il modello ha una proiezione CRS {modelProjection}, ma non è supportata.", "projectedCrsNotProvided": "Il modello è posizionato al centro della vista corrente perché: il modello non ha una proiezione CRS definita." } },