Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
llienher committed Nov 14, 2024
1 parent 496a3a7 commit e5fd56b
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 15 deletions.
2 changes: 1 addition & 1 deletion docker-compose-lib.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions mapserver/mapserver.map.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ MAP
"init=epsg:2056"
END
WEB
TEMPLATE "dummy"
METADATA
"ows_enable_request" "*"
"ows_title" "GeoMapFish demo"
Expand Down
10 changes: 10 additions & 0 deletions tests/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
18 changes: 4 additions & 14 deletions ui/src/interfaces/ControllerDesktop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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/<ogc-server>/ogcapi/*
fetch(
'https://localhost:8484/mapserv_proxy/<ogc-server>/ogcapi/collections/<layer>/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/<ogc-server>/wfs3/*
fetch(
'https://localhost:8484/mapserv_proxy/<ogc-server>/wfs3/collections/<layer-name/items?bbox=6.0,46.0,7.0,47.0&limit=100&offset=0',
'https://localhost:8484/mapserv_proxy/QGIS%20server/wfs3/collections/points/items?bbox=6.0,46.0,7.0,47.0&limit=100&offset=0'
);
fetch(
'http://localhost:8091/mapserv_proxy/wfs3/collections/points/items?bbox=6.0,46.0,7.0,47.0&limit=100&map=/etc/qgisserver/project.qgs',
'http://localhost:8091/mapserv_proxy/wfs3/collections/points/items?bbox=6.0,46.0,7.0,47.0&limit=100&map=/etc/qgisserver/project.qgs'
);

//fetch(
Expand Down

0 comments on commit e5fd56b

Please sign in to comment.