From 3b7b332398a4d1ce578fedd5d2ad77b53dbf49f0 Mon Sep 17 00:00:00 2001 From: Laurent Lienher Date: Thu, 14 Nov 2024 10:43:28 +0100 Subject: [PATCH] fix --- docker-compose-lib.yaml | 2 +- tests/test_app.py | 10 ++++++++++ ui/src/interfaces/ControllerDesktop.ts | 18 ++++-------------- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/docker-compose-lib.yaml b/docker-compose-lib.yaml index 6990a7c7f..0f344c1bb 100644 --- a/docker-compose-lib.yaml +++ b/docker-compose-lib.yaml @@ -82,7 +82,7 @@ services: environment: - PGOPTIONS - MAPSERVER_CONFIG_FILE=/etc/mapserver/mapserver.conf - - MAPSERVER_BASE_PATH=/mapserv_proxy/ + - MAPSERVER_BASE_PATH=/mapserv_proxy - OGCAPI_HTML_TEMPLATE_DIRECTORY=/usr/local/share/mapserver/ogcapi/templates/html-bootstrap4/ - AWS_ACCESS_KEY_ID - AWS_SECRET_ACCESS_KEY diff --git a/tests/test_app.py b/tests/test_app.py index 4698eca30..b5f274602 100644 --- a/tests/test_app.py +++ b/tests/test_app.py @@ -46,6 +46,16 @@ {"map": "/etc/qgisserver/project.qgs", "bbox": "6.0,46.0,7.0,47.0", "limit": "100"}, 60, ), + ( + "https://front/mapserv_proxy/MainPNG/ogcapi/collections/osm_open/items", + {"ogcserver": "Main PNG", "bbox": "6.0,46.0,7.0,47.0", "limit": "100"}, + 60, + ), + ( + "https://front/mapserv_proxy/QGIS%20server/ogcapi/collections/points/items", + {"ogcserver": "QGIS server", "bbox": "6.0,46.0,7.0,47.0", "limit": "100"}, + 60, + ), ], ) def test_url(url: str, params: dict[str, str], timeout: int) -> None: diff --git a/ui/src/interfaces/ControllerDesktop.ts b/ui/src/interfaces/ControllerDesktop.ts index 911d5909e..573a175af 100644 --- a/ui/src/interfaces/ControllerDesktop.ts +++ b/ui/src/interfaces/ControllerDesktop.ts @@ -39,7 +39,6 @@ import ngeoStreetviewModule from 'ngeo/streetview/module'; import ngeoRoutingModule from 'ngeo/routing/module'; import ngeoStatemanagerWfsPermalink from 'ngeo/statemanager/WfsPermalink'; import '../webcomponents/index'; -import {OgcApiEndpoint} from '@camptocamp/ogc-client'; /** * @private @@ -57,29 +56,20 @@ class Controller extends AbstractDesktopController { this.dimensions.FLOOR = '*'; } - // const baseUrl = 'http://localhost:8090/mapserv_proxy/mapserver/MainPNG/ogcapi'; - // const ogcAPIManager = new OgcApiEndpoint(baseUrl); - // - // // features in the bbox - // const bbox: [number, number, number, number] = [-6.8824, 58.1736, -6.7937, 58.2042]; - // ogcAPIManager.getCollectionItems('osm_open', 100, 0, false, undefined, bbox).then((features) => { - // console.log(features); - // }); - // MapServer route: /mapserv_proxy//ogcapi/* fetch( - 'https://localhost:8484/mapserv_proxy//ogcapi/collections//items?bbox=6.0,46.0,7.0,47.0&limit=100&offset=0', + 'https://localhost:8484/mapserv_proxy/Main%20PNG/ogcapi/collections/osm_open/items?bbox=6.0,46.0,7.0,47.0&limit=100&offset=0' ); fetch( - 'http://localhost:8090/mapserv_proxy/MainPNG/ogcapi/collections/osm_open/items?bbox=6.0,46.0,7.0,47.0&limit=100&offset=0&ogcserver=MainPNG', + 'http://localhost:8090/mapserv_proxy/MainPNG/ogcapi/collections/osm_open/items?bbox=6.0,46.0,7.0,47.0&limit=100&offset=0&ogcserver=MainPNG' ); // QGISServer route: /mapserv_proxy//wfs3/* fetch( - 'https://localhost:8484/mapserv_proxy//wfs3/collections/