diff --git a/.python-version b/.python-version index 24ee5b1be..e4fba2183 100644 --- a/.python-version +++ b/.python-version @@ -1 +1 @@ -3.13 +3.12 diff --git a/docker-compose-lib.yaml b/docker-compose-lib.yaml index 9210b816e..0f344c1bb 100644 --- a/docker-compose-lib.yaml +++ b/docker-compose-lib.yaml @@ -97,6 +97,8 @@ services: - CPL_VSIL_CURL_CACHE_SIZE - CPL_VSIL_CURL_USE_HEAD - GDAL_DISABLE_READDIR_ON_OPEN + ports: + - 8090:8080 qgisserver: image: camptocamp/geomapfish-qgisserver:gmf${GEOMAPFISH_MAIN_VERSION}-qgis${QGIS_VERSION} @@ -143,6 +145,8 @@ services: - QGIS_SERVER_API_WFS3_MAX_LIMIT - QGIS_SERVER_LANDING_PAGE_PROJECTS_DIRECTORIES - QGIS_SERVER_OVERRIDE_SYSTEM_LOCALE + ports: + - 8091:8080 tinyows: image: camptocamp/tinyows:master diff --git a/env.default b/env.default index a8706b155..e5691af7b 100644 --- a/env.default +++ b/env.default @@ -44,7 +44,7 @@ TILECLOUDCHAIN_INTERNAL_URL=http://tilecloudchain:8080 TILECLOUDCHAIN_INTERNAL_HOST=tilecloudchain TILECLOUDCHAIN_INTERNAL_PORT=8080 # For internal print -MAPSERVER_URL=http://mapserver:8080/ +MAPSERVER_URL=http://mapserver:8080/mapserv_proxy TINYOWS_URL=http://tinyows:8080/ QGISSERVER_URL=http://qgisserver:8080/mapserv_proxy QGIS_VERSION=3.34-gdal3.8 diff --git a/mapserver/mapserver.map.tmpl b/mapserver/mapserver.map.tmpl index 69061d0a0..ac3cdfe79 100644 --- a/mapserver/mapserver.map.tmpl +++ b/mapserver/mapserver.map.tmpl @@ -69,13 +69,13 @@ MAP END WEB METADATA - "wms_title" "GeoMapFish demo" - "wms_abstract" "Some example layers" - "ows_onlineresource" "${VISIBLE_WEB_PROTOCOL}://${VISIBLE_WEB_HOST}${VISIBLE_ENTRY_POINT}mapserv_proxy?ogcserver=Main+PNG" + "ows_enable_request" "*" + "ows_title" "GeoMapFish demo" + "ows_abstract" "Some example layers" "ows_srs" "EPSG:2056" - "wms_enable_request" "*" - "wfs_enable_request" "*" "wms_allow_getmap_without_styles" "true" + "ows_onlineresource" "${VISIBLE_WEB_PROTOCOL}://${VISIBLE_WEB_HOST}${VISIBLE_ENTRY_POINT}mapserv_proxy/?ogcserver=MainPNG" + "oga_onlineresource" "${VISIBLE_WEB_PROTOCOL}://${VISIBLE_WEB_HOST}${VISIBLE_ENTRY_POINT}mapserv_proxy/mapserver/MainPNG/ogcapi" END END LEGEND diff --git a/ui/package-lock.json b/ui/package-lock.json index b933aba5b..ab96c876b 100644 --- a/ui/package-lock.json +++ b/ui/package-lock.json @@ -9,6 +9,7 @@ "version": "1.0.0", "license": "BSD-2-Clause license", "dependencies": { + "@camptocamp/ogc-client": "1.1.0", "ngeo": "2.9.0-latest.20241030T072255Z.1c68af25a" }, "devDependencies": { @@ -84,6 +85,27 @@ "dev": true, "license": "(Apache-2.0 AND BSD-3-Clause)" }, + "node_modules/@camptocamp/ogc-client": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@camptocamp/ogc-client/-/ogc-client-1.1.0.tgz", + "integrity": "sha512-+Vj4G1D6YNxqRsKtdCA6fWHlFjNJxdK8xRbnXlgJwfRNtFxK78qkPeAuN82hxjgZrEmAOQzPZWgELDAjDq2UAQ==", + "license": "BSD-3-Clause", + "dependencies": { + "@rgrove/parse-xml": "^4.1.0" + }, + "peerDependencies": { + "ol": ">5.x", + "proj4": ">2.8" + }, + "peerDependenciesMeta": { + "ol": { + "optional": true + }, + "proj4": { + "optional": true + } + } + }, "node_modules/@esbuild/aix-ppc64": { "version": "0.23.1", "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.23.1.tgz", @@ -580,6 +602,15 @@ "license": "MIT", "peer": true }, + "node_modules/@rgrove/parse-xml": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@rgrove/parse-xml/-/parse-xml-4.2.0.tgz", + "integrity": "sha512-UuBOt7BOsKVOkFXRe4Ypd/lADuNIfqJXv8GvHqtXaTYXPPKkj2nS2zPllVsrtRjcomDhIJVBnZwfmlI222WH8g==", + "license": "ISC", + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/@rollup/plugin-inject": { "version": "5.0.5", "resolved": "https://registry.npmjs.org/@rollup/plugin-inject/-/plugin-inject-5.0.5.tgz", diff --git a/ui/package.json b/ui/package.json index 47f0469b5..e42c5432d 100644 --- a/ui/package.json +++ b/ui/package.json @@ -21,7 +21,8 @@ "vite": "5.4.10" }, "dependencies": { - "ngeo": "2.9.0-latest.20241030T072255Z.1c68af25a" + "ngeo": "2.9.0-latest.20241030T072255Z.1c68af25a", + "@camptocamp/ogc-client": "1.1.0" }, "alias": { "ngeo/": "ngeo/distlib/src/", diff --git a/ui/src/interfaces/ControllerDesktop.ts b/ui/src/interfaces/ControllerDesktop.ts index 505d9da0e..911d5909e 100644 --- a/ui/src/interfaces/ControllerDesktop.ts +++ b/ui/src/interfaces/ControllerDesktop.ts @@ -39,6 +39,7 @@ 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 @@ -55,6 +56,37 @@ class Controller extends AbstractDesktopController { if (this.dimensions.FLOOR == undefined) { 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', + ); + 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', + ); + + // QGISServer route: /mapserv_proxy//wfs3/* + fetch( + 'https://localhost:8484/mapserv_proxy//wfs3/collections/