diff --git a/workshop/content/docs/advanced/clusters.md b/workshop/content/docs/advanced/clusters.md index 4ec1b88..b16302b 100644 --- a/workshop/content/docs/advanced/clusters.md +++ b/workshop/content/docs/advanced/clusters.md @@ -31,8 +31,8 @@ CLASS !!! example - - MapServer request: - - OpenLayers example: + - MapServer request: + - OpenLayers example: ??? JavaScript "clusters.js" @@ -55,4 +55,4 @@ CLASS MAXDISTANCE 50 REGION "ellipse" END - ``` \ No newline at end of file + ``` diff --git a/workshop/content/docs/advanced/sld.md b/workshop/content/docs/advanced/sld.md index 371f729..3ce5e25 100644 --- a/workshop/content/docs/advanced/sld.md +++ b/workshop/content/docs/advanced/sld.md @@ -24,10 +24,10 @@ This exercise will focus on the first use case. !!! example - - Direct MapServer request: - - Local OpenLayers example: - - GetCapabilities request: - - Request to generate SLD from a Mapfile: + - Direct MapServer request: + - Local OpenLayers example: + - GetCapabilities request: + - Request to generate SLD from a Mapfile: ???+ SLD diff --git a/workshop/content/docs/advanced/symbols.md b/workshop/content/docs/advanced/symbols.md index 5cd2e02..725d5c0 100644 --- a/workshop/content/docs/advanced/symbols.md +++ b/workshop/content/docs/advanced/symbols.md @@ -81,8 +81,8 @@ END !!! example - - Direct MapServer request: - - Local OpenLayers example: + - Direct MapServer request: + - Local OpenLayers example: ??? JavaScript "railways.js" @@ -114,4 +114,4 @@ END ## Further Reading - [Cartographical Symbol Construction with MapServer](https://mapserver.org/mapfile/symbology/construction.html) -- [MapServer Symbology Exchange](https://github.com/MapServer/MapServer/wiki/SymbologyExchangeVector) \ No newline at end of file +- [MapServer Symbology Exchange](https://github.com/MapServer/MapServer/wiki/SymbologyExchangeVector) diff --git a/workshop/content/docs/inputs/databases.md b/workshop/content/docs/inputs/databases.md index 5a5e484..d146396 100644 --- a/workshop/content/docs/inputs/databases.md +++ b/workshop/content/docs/inputs/databases.md @@ -78,8 +78,8 @@ Online example not available as no PostGIS installation on the server !!! example "Exercise Links" - - MapServer request: - - OpenLayers example: + - MapServer request: + - OpenLayers example: ??? JavaScript "postgis.js" @@ -97,7 +97,7 @@ Online example not available as no PostGIS installation on the server 1. Try and load another dataset into the database using the `ogr2ogr` approach above. 2. Now add a new layer to the Mapfile to display the layer. You can make a direct request to MapServer in the form: - . + . 3. Now update the JS file so the layer is visible as part of the interactive map, through WMS: ```js @@ -106,4 +106,4 @@ Online example not available as no PostGIS installation on the server params: { 'LAYERS': 'water,NEWLAYERNAME', 'STYLES': '' }, ratio: 1 }), - ``` \ No newline at end of file + ``` diff --git a/workshop/content/docs/inputs/raster.md b/workshop/content/docs/inputs/raster.md index a87fef7..0df7ae7 100644 --- a/workshop/content/docs/inputs/raster.md +++ b/workshop/content/docs/inputs/raster.md @@ -86,8 +86,8 @@ A [COMPOSITE](https://mapserver.org/mapfile/composite.html) block is used on the !!! example - - MapServer request: - - OpenLayers example: + - MapServer request: + - OpenLayers example: ??? JavaScript "raster.js" @@ -105,4 +105,4 @@ A [COMPOSITE](https://mapserver.org/mapfile/composite.html) block is used on the 1. Try different settings for layer `OPACITY` to see its effect on the output in `raster.map`. 2. Change the `COLOR` of the first `CLASS` in `terrain.include` to highlight which pixels have values in this range. - Cyan (`COLOR 0 255 255`) is a good colour for highlighting. \ No newline at end of file + Cyan (`COLOR 0 255 255`) is a good colour for highlighting. diff --git a/workshop/content/docs/inputs/vector.md b/workshop/content/docs/inputs/vector.md index 44ac85d..0b136a7 100644 --- a/workshop/content/docs/inputs/vector.md +++ b/workshop/content/docs/inputs/vector.md @@ -38,8 +38,8 @@ than a huge GeoTIFF file. !!! example - - MapServer request: - - OpenLayers example: + - MapServer request: + - OpenLayers example: ??? JavaScript "stars.js" diff --git a/workshop/content/docs/introduction/commandline.md b/workshop/content/docs/introduction/commandline.md index 3d8b405..3aad4e1 100644 --- a/workshop/content/docs/introduction/commandline.md +++ b/workshop/content/docs/introduction/commandline.md @@ -21,7 +21,7 @@ INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE INPUT=FLATGEOBUF When run through a web server, data is passed to the `mapserv` application, which generates output that is then sent back through the web server. All web requests can be recreated and tested on the command line, this makes it a handy debugging tool. -To test a URL such as run the following command: +To test a URL such as run the following command: ```bash mapserv "QUERY_STRING=map=/etc/mapserver/countries.map&mode=map" diff --git a/workshop/content/docs/introduction/docker.md b/workshop/content/docs/introduction/docker.md index f1b8b10..375b9e1 100644 --- a/workshop/content/docs/introduction/docker.md +++ b/workshop/content/docs/introduction/docker.md @@ -10,7 +10,7 @@ MapServer runs on the Apache web server - see the [Apache page](../advanced/apac It uses the Apache [mod_fcgid module](https://httpd.apache.org/mod_fcgid/), module that provides FastCGI support. -MapServer runs on port 80 on the Docker container, which is mapped to port 5000 on the local machine, as can be seen in the Docker compose file +MapServer runs on port 80 on the Docker container, which is mapped to port 5002 on the local machine, as can be seen in the Docker compose file located at `workshop\exercises\docker-compose.yml`: ```yaml @@ -18,7 +18,7 @@ located at `workshop\exercises\docker-compose.yml`: image: camptocamp/mapserver:8.4-gdal3.10 container_name: mapserver ports: - - 5000:80 + - 5002:80 environment: MAPSERVER_CONFIG_FILE: "/etc/mapserver/mapserver.conf" volumes: @@ -37,7 +37,7 @@ A second container that serves the JavaScript example pages is also run using Do image: node:lts-slim container_name: node ports: - - 5001:5001 + - 5001:7001 working_dir: /home/node/app volumes: - ./app:/home/node/app @@ -55,8 +55,8 @@ A second container that serves the JavaScript example pages is also run using Do # start docker in detached mode docker compose up -d # the following URLs should now be available - # http://localhost:5000 - # http://localhost:5001 + # http://localhost:7000 + # http://localhost:7001 # stop docker docker compose down @@ -73,4 +73,4 @@ A second container that serves the JavaScript example pages is also run using Do ```bash # to remove a container named db docker rm db -``` \ No newline at end of file +``` diff --git a/workshop/content/docs/introduction/introduction.md b/workshop/content/docs/introduction/introduction.md index 3b0fc74..d93823f 100644 --- a/workshop/content/docs/introduction/introduction.md +++ b/workshop/content/docs/introduction/introduction.md @@ -56,13 +56,13 @@ setup provided to you is actually working. The configuration file for Docker Com docker compose up ``` - 2. Open in your browser, you should see an error message! + 2. Open in your browser, you should see an error message! 3. Close by pressing `CTRL-C` # Displaying your First Map -- Ensure that you have MapServer setup and running at . -- Now try opening the following MapServer URL in your browser - +- Ensure that you have MapServer setup and running at . +- Now try opening the following MapServer URL in your browser - !!! note @@ -72,7 +72,7 @@ setup provided to you is actually working. The configuration file for Docker Com ```bash docker compose up -d docker container ls # verify that the mapserver container is running - # visit http://localhost:5000 in your browser + # visit http://localhost:7000 in your browser docker logs --follow mapserver # view logs docker compose stop ``` diff --git a/workshop/content/docs/introduction/openlayers.md b/workshop/content/docs/introduction/openlayers.md index 6da963c..3c8bd36 100644 --- a/workshop/content/docs/introduction/openlayers.md +++ b/workshop/content/docs/introduction/openlayers.md @@ -15,7 +15,7 @@ A useful introduction to OpenLayers can be found [here](https://openlayers.org/w ## HTML example pages The HTML pages are served using a Docker container, and when the containers are -running an index page for all workshop exercises is available at . +running an index page for all workshop exercises is available at . The HTML files used in the workshop are located in `exercises/app`. The JavaScript files can be found in `exercises/app/js`. These files can be edited, and changes viewed in the browser. diff --git a/workshop/content/docs/mapfile/labels.md b/workshop/content/docs/mapfile/labels.md index 24dc255..bac2adf 100644 --- a/workshop/content/docs/mapfile/labels.md +++ b/workshop/content/docs/mapfile/labels.md @@ -41,8 +41,8 @@ GEOMTRANSFORM (centerline(densify([shape], 0.1))) !!! example - - Direct MapServer request: - - Local OpenLayers example: + - Direct MapServer request: + - Local OpenLayers example: ??? JavaScript "lakes.js" @@ -76,4 +76,4 @@ GEOMTRANSFORM (centerline(densify([shape], 0.1))) # workaround for https://github.com/MapServer/MapServer/issues/7058 ---> \ No newline at end of file +--> diff --git a/workshop/content/docs/mapfile/lines.md b/workshop/content/docs/mapfile/lines.md index ab9e295..306a420 100644 --- a/workshop/content/docs/mapfile/lines.md +++ b/workshop/content/docs/mapfile/lines.md @@ -64,8 +64,8 @@ END !!! example - - Direct MapServer request: - - Local OpenLayers example: + - Direct MapServer request: + - Local OpenLayers example: !!! tip diff --git a/workshop/content/docs/mapfile/points.md b/workshop/content/docs/mapfile/points.md index b87eef9..079b8bf 100644 --- a/workshop/content/docs/mapfile/points.md +++ b/workshop/content/docs/mapfile/points.md @@ -49,7 +49,7 @@ In the Mapfile itself we then reference this file and use any of the font aliase In the example below we're using a cinema character from Google's [Material Symbols](https://fonts.google.com/icons). We use HTML entity number of the symbol we want in the [CHARACTER](https://mapserver.org/mapfile/symbol.html#mapfile-symbol-character) keyword. -A list of these codes and their associated symbols can be seen at [http://localhost:5001/fonts.html](http://localhost:5001/fonts.html). +A list of these codes and their associated symbols can be seen at [http://localhost:7001/fonts.html](http://localhost:7001/fonts.html). ```scala FONTSET "data/fonts/fontset.txt" @@ -65,8 +65,8 @@ END !!! example - - Direct MapServer request: - - Local OpenLayers example: + - Direct MapServer request: + - Local OpenLayers example: ??? JavaScript "points.js" @@ -84,7 +84,7 @@ END 1. Edit the `workshop/exercises/app/js/points.js` to show the OpenStreetMap base layer. You need to set the `visible: false` to `visible: true`. 2. Change the default `CLASS` to use larger points in a more visible colour. -3. Add another class to display another point type. Choose an appropriate symbol from the list at . Some example attribute types include `fast_food`, `monument`, and `post_box`. The source dataset is `workshop/exercises/mapfiles/data/osm/pois.fgb` - this can be opened in QGIS to view all available attributes and values. +3. Add another class to display another point type. Choose an appropriate symbol from the list at . Some example attribute types include `fast_food`, `monument`, and `post_box`. The source dataset is `workshop/exercises/mapfiles/data/osm/pois.fgb` - this can be opened in QGIS to view all available attributes and values. \ No newline at end of file +--> diff --git a/workshop/content/docs/mapfile/polygons.md b/workshop/content/docs/mapfile/polygons.md index b33aad8..700dd24 100644 --- a/workshop/content/docs/mapfile/polygons.md +++ b/workshop/content/docs/mapfile/polygons.md @@ -50,8 +50,8 @@ CLASS !!! example - - Direct MapServer request: - - Local OpenLayers example: + - Direct MapServer request: + - Local OpenLayers example: !!! tip diff --git a/workshop/content/docs/outputs/ogcfeatures.md b/workshop/content/docs/outputs/ogcapi-features.md similarity index 58% rename from workshop/content/docs/outputs/ogcfeatures.md rename to workshop/content/docs/outputs/ogcapi-features.md index 0ee0015..ce79424 100644 --- a/workshop/content/docs/outputs/ogcfeatures.md +++ b/workshop/content/docs/outputs/ogcapi-features.md @@ -1,21 +1,21 @@ -# OGC Features API +# OGC API - Features ## Overview -In this exercise we'll be configuring MapServer to serve out data using the -MapServer's [OGC Features API](https://mapserver.org/ogc/ogc_api.html). See the [OGC Features Overview](https://github.com/opengeospatial/ogcapi-features/blob/master/ogcapi-ogc-org-features-overview.md) page for more details. +In this exercise we'll be configuring MapServer to serve out data using +MapServer's [OGC API - Features](https://mapserver.org/ogc/ogc_api.html). See the [OGC API - Features Overview](https://ogcapi.ogc.org/features/overview.html) page for more details.
- +
## Configuring your Mapfile As with other OGC services most configuration is done using `METADATA` blocks. -The prefix for the OGC Features API metadata settings is `oga_`. +The prefix for the OGC API - Features metadata settings is `oga_`. -To enable the OGC Features API enable it in the `WEB` `METADATA`, using either +To enable the OGC API - Features enable it in the `WEB` `METADATA`, using either `ows_enable_request` or `oga_enable_request`. We also need to set the `oga_onlineresource` value to the root of the service: ```scala @@ -23,7 +23,7 @@ WEB METADATA ... ows_enable_request "*" # this enables all OGC requests - oga_onlineresource "/ogcfeatures/ogcapi" + oga_onlineresource "/ogcapi-features/ogcapi" END END ``` @@ -58,11 +58,11 @@ The key part of the `CONFIG` file are the `MAPS` section where a URL paths are p ```scala MAPS - OGCFEATURES "/etc/mapserver/ogcfeatures.map" + OGCFEATURES "/etc/mapserver/ogcapi-features.map" END ``` -The other relevant setting is the environment variable `OGCAPI_HTML_TEMPLATE_DIRECTORY` in the `ENV` section. This points to a folder containing templates used to create the HTML interface when browsing the OGC Features API: +The other relevant setting is the environment variable `OGCAPI_HTML_TEMPLATE_DIRECTORY` in the `ENV` section. This points to a folder containing templates used to create the HTML interface when browsing the OGC API - Features: ```scala ENV @@ -70,19 +70,19 @@ ENV END ``` -## Browsing the OGC Features API Collections +## Browsing the OGC API - Features Collections -The OGC Features API can be viewed as HTML pages, which are rendered using templates provided by MapServer. They can also be accessed as JSON. +The OGC API - Features can be viewed as HTML pages, which are rendered using templates provided by MapServer. They can also be accessed as JSON. The services use hierarchical URLs for example: -* The root of the service is at -* The feature collections are listed at -* The Polygon feature collection is available at +* The root of the service is at +* The feature collections are listed at +* The Polygon feature collection is available at -## Adding OGC Features to OpenLayers +## Adding OGC API - Features to OpenLayers -As the OGC Features API returns GeoJSON, adding a vector layer to OpenLayers is straightforward. We simply pass in the URL pointing to the collection items: +As the OGC API - Features returns GeoJSON, adding a vector layer to OpenLayers is straightforward. We simply pass in the URL pointing to the collection items: ```js new VectorLayer({ @@ -91,7 +91,7 @@ new VectorLayer({ 'stroke-width': 1.3, }, source: new Vector({ - url: mapserverUrl + 'ogcfeatures/ogcapi/collections/pois_polygon/items?f=json&limit=500', + url: mapserverUrl + 'ogcapi-features/ogcapi/collections/pois_polygon/items?f=json&limit=500', format: new GeoJSON(), }), }), @@ -101,25 +101,25 @@ new VectorLayer({ !!! example - - Direct MapServer request: - - Direct MapServer request: - - Local OpenLayers example: + - Direct MapServer request: + - Direct MapServer request: + - Local OpenLayers example: -??? JavaScript "ogcfeatures.js" +??? JavaScript "ogcapi-features.js" ``` js - --8<-- "ogcfeatures.js" + --8<-- "ogcapi-features.js" ``` -??? Mapfile "ogcfeatures.map" +??? Mapfile "ogcapi-features.map" ``` scala - --8<-- "ogcfeatures.map" + --8<-- "ogcapi-features.map" ``` ## Exercises -1. Modify the `workshop\exercises\mapfiles\railways.map` to enable the OGC Features API. You will need to add a new entry to the `MAPS` section in `workshop\exercises\mapfiles\mapserver.conf` and restart the Docker container to be able to browse the OGC Features API interface. +1. Modify the `workshop\exercises\mapfiles\railways.map` to enable the OGC API - Features. You will need to add a new entry to the `MAPS` section in `workshop\exercises\mapfiles\mapserver.conf` and restart the Docker container to be able to browse the OGC API - Features interface. ```scala MAPS @@ -132,10 +132,10 @@ new VectorLayer({ !!! tip - You need to add `TEMPLATE "void"` to each of the layers you want to make available through the OGC Features API. + You need to add `TEMPLATE "void"` to each of the layers you want to make available through the OGC API - Features. [TEMPLATE](https://mapserver.org/mapfile/layer.html#mapfile-layer-template) is a left-over from when HTML templates were used to return features, and allows the layer to be queried. - Once setup correctly you should be able to browse the OGC Features API at . + Once setup correctly you should be able to browse the OGC API - Features at . ## Possible Errors @@ -147,4 +147,4 @@ new VectorLayer({ } ``` - `oga_html_template_directory` can be set either at the Mapfile level or in the CONFIG file. Mapfile takes precedence. \ No newline at end of file + `oga_html_template_directory` can be set either at the Mapfile level or in the CONFIG file. Mapfile takes precedence. diff --git a/workshop/content/docs/outputs/tiles.md b/workshop/content/docs/outputs/tiles.md index 38c687f..6c44dbd 100644 --- a/workshop/content/docs/outputs/tiles.md +++ b/workshop/content/docs/outputs/tiles.md @@ -45,9 +45,9 @@ new TileLayer({ !!! example - - Direct MapServer request: - - MapServer request: - - Local OpenLayers example: + - Direct MapServer request: + - MapServer request: + - Local OpenLayers example: ??? JavaScript "tiles.js" diff --git a/workshop/content/docs/outputs/vector-tiles.md b/workshop/content/docs/outputs/vector-tiles.md index 5ac31b3..3461716 100644 --- a/workshop/content/docs/outputs/vector-tiles.md +++ b/workshop/content/docs/outputs/vector-tiles.md @@ -48,7 +48,7 @@ new VectorTileLayer({ !!! example - - Local OpenLayers example: + - Local OpenLayers example: ??? JavaScript "vector-tiles.js" diff --git a/workshop/content/docs/outputs/wcs.md b/workshop/content/docs/outputs/wcs.md index 990489e..25b07a8 100644 --- a/workshop/content/docs/outputs/wcs.md +++ b/workshop/content/docs/outputs/wcs.md @@ -9,22 +9,22 @@ https://mapserver.org/ogc/wcs_format.html We'll be using [WCS 2.0](https://mapserver.org/ogc/wcs_server.html#wcs-2-0) for this tutorial. # GetCapabilities -http://localhost:5000/?map=/etc/mapserver/wcs.map&SERVICE=WCS&REQUEST=GetCapabilities +http://localhost:7000/?map=/etc/mapserver/wcs.map&SERVICE=WCS&REQUEST=GetCapabilities # DescribeCoverage 2.0 -http://localhost:5000/?map=/etc/mapserver/wcs.map&SERVICE=WCS&VERSION=2.0.1&REQUEST=DescribeCoverage&COVERAGEID=dtm +http://localhost:7000/?map=/etc/mapserver/wcs.map&SERVICE=WCS&VERSION=2.0.1&REQUEST=DescribeCoverage&COVERAGEID=dtm # GetCoverage 2.0 image/tiff full -http://localhost:5000/?map=/etc/mapserver/wcs.map&SERVICE=WCS&VERSION=2.0.1&REQUEST=GetCoverage&COVERAGEID=dtm&FORMAT=image/tiff +http://localhost:7000/?map=/etc/mapserver/wcs.map&SERVICE=WCS&VERSION=2.0.1&REQUEST=GetCoverage&COVERAGEID=dtm&FORMAT=image/tiff ```bash gdalinfo /etc/mapserver/data/raster/54752_dtm_1m.tif ``` NoData Value=-9999 -Size is 5000, 5000 +Size is 5002, 5002 -curl "http://localhost:5000/?map=/etc/mapserver/wcs.map&SERVICE=WCS&REQUEST=GetCapabilities" +curl "http://localhost:7000/?map=/etc/mapserver/wcs.map&SERVICE=WCS&REQUEST=GetCapabilities" !!! tip @@ -47,4 +47,4 @@ gdalinfo output.tif \ No newline at end of file +--> diff --git a/workshop/content/docs/outputs/wms.md b/workshop/content/docs/outputs/wms.md index cf3d8b6..afee91e 100644 --- a/workshop/content/docs/outputs/wms.md +++ b/workshop/content/docs/outputs/wms.md @@ -20,7 +20,7 @@ Prefixes are used to configure different types of web service. For example: - `wms_` is used for WMS services, for example `"wms_title"` can be set in the `WEB` `METADATA` block to set the title of the WMS service. This will be seen when read with client applications such as QGIS. - `wfs_` is used for Web Feature Services. -- `oga_` is used for the new [OGC Features API](ogcfeatures.md). +- `oga_` is used for the new [OGC API - Features](ogcapi-features.md). !!! tip @@ -49,7 +49,7 @@ More details are in [the documentation](https://www.mapserver.org/ogc/wms_server A sample request for the legend for the `polygons.map` is as follows: -- +- !!! tip @@ -63,8 +63,8 @@ A sample request for the legend for the `polygons.map` is as follows: ## Exercises -1. If you've read this far you deserve to discover one of MapServer's Easter eggs. Try changing the output format to `&format=image/txt`. We'll use the `polygons.map` for the request: +1. If you've read this far you deserve to discover one of MapServer's Easter eggs. Try changing the output format to `&format=image/txt`. We'll use the `polygons.map` for the request: 2. Create a `GetLegendGraphic` request, but for the `points.map` for the `layer=poi`. -3. Run a [GetCapabilities](http://localhost:5000/?map=/etc/mapserver/polygons.map&service=wms&version=1.3.0&request=GetCapabilities) request for the `polygon.map`. +3. Run a [GetCapabilities](http://localhost:7000/?map=/etc/mapserver/polygons.map&service=wms&version=1.3.0&request=GetCapabilities) request for the `polygon.map`. Add various `METADATA` pairs listed in the [Web Object Metadata](https://mapserver.org/ogc/wms_server.html#web-object-metadata) and check its output in the `GetCapabilities` response. diff --git a/workshop/content/docs/setup.md b/workshop/content/docs/setup.md index 632809b..b9f9c37 100644 --- a/workshop/content/docs/setup.md +++ b/workshop/content/docs/setup.md @@ -67,8 +67,6 @@ Some installation notes for different operating systems: ### Mac * If you are using [Homebrew](https://brew.sh), consider using the [brew Docker formula](https://formulae.brew.sh/formula/Docker) -* On MacOS Monterey, there is an issue with the port 5000 that is already used and therefore conflicting to the default one used by MapServer. - If you are facing with this error `OSError: [Errno 48] Address already in use` then you need to can disable the *Airplay Receiver* from `System Preference->Sharing` of your MacOS (detailed description in this blog [post](https://progressstory.com/tech/port-5000-already-in-use-macos-monterey-issue/)). ### Linux @@ -108,8 +106,8 @@ cd /home/getting-started-with-mapserver/workshop/exercises/ sudo docker compose up # Test the following URLs in a browser -# http://localhost:5000 -# http://localhost:5001/lines.html +# http://localhost:7000 +# http://localhost:7001/lines.html ``` ### Testing the Docker installation @@ -149,13 +147,13 @@ docker compose down ``` Once the containers are downloaded you can test they are running and you can connect to them. Open a web browser -and navigate to . You should see the following message: +and navigate to . You should see the following message: ```bash loadParams(): Web application error. No query information to decode. QUERY_STRING is set, but empty. ``` -This is good! It means MapServer is running. Next we can check that the front-end container is running by opening . +This is good! It means MapServer is running. Next we can check that the front-end container is running by opening . Hopefully you'll see a map, and we're ready to start the workshop. ## Possible Errors @@ -167,4 +165,4 @@ by another program trying to update Ubuntu. Rebooting may fix this, or you can t * `docker-desktop : Depends: docker-ce-cli but it is not installable` - you are attempting to install Docker Desktop, but have not yet installed the Docker Engine. * `unable to get image 'node:lts-slim': error during connect: in the default daemon configuration on Windows, the docker client must be run with elevated privileges to connect: Get "http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.50/images/node:lts-slim/json": open //./pipe/docker_engine: The system cannot find the file specified.` - - you will need \ No newline at end of file + - you will need diff --git a/workshop/content/mkdocs.yml b/workshop/content/mkdocs.yml index 1308fb4..69fa69a 100644 --- a/workshop/content/mkdocs.yml +++ b/workshop/content/mkdocs.yml @@ -27,7 +27,7 @@ nav: - WFS: outputs/wfs.md - Tiles: outputs/tiles.md - Vector Tiles: outputs/vector-tiles.md - - OGC Features API: outputs/ogcfeatures.md + - OGC API - Features: outputs/ogcapi-features.md - Advanced: - Vector Symbols: advanced/symbols.md - Clusters: advanced/clusters.md diff --git a/workshop/exercises/README.md b/workshop/exercises/README.md index 7fefde6..8af53d9 100644 --- a/workshop/exercises/README.md +++ b/workshop/exercises/README.md @@ -10,8 +10,8 @@ navigate to the `workshop/exercises` folder and run the following command: docker compose up -d ``` -This will start a Docker container with MapServer (reachable from the browser at ), and -a Docker container with an OpenLayers development environment (reachable from the browser at ). +This will start a Docker container with MapServer (reachable from the browser at ), and +a Docker container with an OpenLayers development environment (reachable from the browser at ). To stop, use the command: @@ -24,4 +24,4 @@ To connect to the containers to use bash commands you can use the following comm ```bash docker exec -it mapserver bash docker exec -it node bash -``` \ No newline at end of file +``` diff --git a/workshop/exercises/app/.env b/workshop/exercises/app/.env index b7f5753..d0bec13 100644 --- a/workshop/exercises/app/.env +++ b/workshop/exercises/app/.env @@ -1,4 +1,4 @@ -VITE_MAPSERVER_BASE_URL=http://localhost:5000/? -VITE_MAPSERVER_OGC_BASE_URL=http://localhost:5000/ +VITE_MAPSERVER_BASE_URL=http://localhost:5002/? +VITE_MAPSERVER_OGC_BASE_URL=http://localhost:5002/ VITE_MAPFILES_PATH=map=/etc/mapserver/ -VITE_APP_URL=http://node:5001/ \ No newline at end of file +VITE_APP_URL=http://node:5001/ diff --git a/workshop/exercises/app/index.html b/workshop/exercises/app/index.html index e8f33d4..d9e13de 100644 --- a/workshop/exercises/app/index.html +++ b/workshop/exercises/app/index.html @@ -28,7 +28,7 @@

Outputs

  • WFS
  • Tiles Mode
  • Vector Tiles
  • -
  • OGC Features API
  • +
  • OGC API - Features
  • Advanced

      @@ -46,4 +46,4 @@

      Miscellaneous

      - \ No newline at end of file + diff --git a/workshop/exercises/app/js/ogcfeatures.js b/workshop/exercises/app/js/ogcapi-features.js similarity index 88% rename from workshop/exercises/app/js/ogcfeatures.js rename to workshop/exercises/app/js/ogcapi-features.js index ff53b3c..5db8178 100644 --- a/workshop/exercises/app/js/ogcfeatures.js +++ b/workshop/exercises/app/js/ogcapi-features.js @@ -18,7 +18,7 @@ const layers = [ 'stroke-width': 1.3, }, source: new Vector({ - url: mapserverUrl + 'ogcfeatures/ogcapi/collections/pois_polygon/items?f=json&limit=500', + url: mapserverUrl + 'ogcapi-features/ogcapi/collections/pois_polygon/items?f=json&limit=500', format: new GeoJSON(), }), }), diff --git a/workshop/exercises/app/ogcfeatures.html b/workshop/exercises/app/ogcapi-features.html similarity index 76% rename from workshop/exercises/app/ogcfeatures.html rename to workshop/exercises/app/ogcapi-features.html index 076ab13..1923f8b 100644 --- a/workshop/exercises/app/ogcfeatures.html +++ b/workshop/exercises/app/ogcapi-features.html @@ -5,10 +5,10 @@ - OGC Features API + OGC API - Features
      - + diff --git a/workshop/exercises/app/vite.config.js b/workshop/exercises/app/vite.config.js index 8a7f2d2..91a653a 100644 --- a/workshop/exercises/app/vite.config.js +++ b/workshop/exercises/app/vite.config.js @@ -13,7 +13,7 @@ export default { base: '', // otherwise assets are located at /assets server: { host: true, // allow connections from other Docker containers - allowedHosts: ['node', 'geographika.github.io'], // allow access using http://node:5001 from the mapserver container + allowedHosts: ['node', 'geographika.github.io'], // allow access using http://node:7001 from the mapserver container port: 5001, watch: { // fix for Windows on WSL - https://github.com/vitejs/vite/issues/1153 diff --git a/workshop/exercises/docker-compose.yml b/workshop/exercises/docker-compose.yml index 5ade73e..4e71fc5 100644 --- a/workshop/exercises/docker-compose.yml +++ b/workshop/exercises/docker-compose.yml @@ -32,7 +32,7 @@ services: image: camptocamp/mapserver:8.4-gdal3.10 container_name: mapserver ports: - - 5000:80 + - 7000:80 environment: MAPSERVER_CONFIG_FILE: "/etc/mapserver/mapserver.conf" volumes: @@ -45,7 +45,7 @@ services: image: node:lts-slim container_name: node ports: - - 5001:5001 + - 7001:7001 working_dir: /home/node/app volumes: - ./app:/home/node/app @@ -55,4 +55,4 @@ services: sh -c "npm install && npm start" networks: - mynetwork: \ No newline at end of file + mynetwork: diff --git a/workshop/exercises/docker-db-compose.yml b/workshop/exercises/docker-db-compose.yml index 6ca0bb7..00c2478 100644 --- a/workshop/exercises/docker-db-compose.yml +++ b/workshop/exercises/docker-db-compose.yml @@ -32,7 +32,7 @@ services: image: camptocamp/mapserver:8.4-gdal3.10 container_name: mapserver2 ports: - - 5000:80 + - 7000:80 environment: MAPSERVER_CONFIG_FILE: "/etc/mapserver/mapserver.conf" volumes: @@ -45,7 +45,7 @@ services: image: node:lts-slim container_name: node2 ports: - - 5001:5001 + - 7001:7001 working_dir: /home/node/app volumes: - ./app:/home/node/app @@ -74,4 +74,4 @@ services: - mynetwork networks: - mynetwork: \ No newline at end of file + mynetwork: diff --git a/workshop/exercises/mapfiles/mapserver.conf b/workshop/exercises/mapfiles/mapserver.conf index d0131e4..94b6ec9 100644 --- a/workshop/exercises/mapfiles/mapserver.conf +++ b/workshop/exercises/mapfiles/mapserver.conf @@ -58,7 +58,7 @@ CONFIG # Map Aliases # MAPS - OGCFEATURES "/etc/mapserver/ogcfeatures.map" + OGCAPI-FEATURES "/etc/mapserver/ogcapi-features.map" END END diff --git a/workshop/exercises/mapfiles/ogcfeatures.map b/workshop/exercises/mapfiles/ogcapi-features.map similarity index 91% rename from workshop/exercises/mapfiles/ogcfeatures.map rename to workshop/exercises/mapfiles/ogcapi-features.map index 44886a7..6767f03 100644 --- a/workshop/exercises/mapfiles/ogcfeatures.map +++ b/workshop/exercises/mapfiles/ogcapi-features.map @@ -1,5 +1,5 @@ MAP - NAME "OGC Features" + NAME "OGC API - Features" EXTENT 17.77 43.31 17.83 43.36 UNITS DD SIZE 600 600 @@ -13,7 +13,7 @@ MAP "ows_title" "OSM Features" "ows_enable_request" "*" # this enables all OGC requests "ows_srs" "EPSG:4326 EPSG:3857" - "oga_onlineresource" "/ogcfeatures/ogcapi" + "oga_onlineresource" "/ogcapi-features/ogcapi" # "oga_html_template_directory" # "oga_enable_request" "*" END @@ -49,4 +49,4 @@ MAP CONNECTION "data/osm/mostar/pois_a.fgb" END -END \ No newline at end of file +END diff --git a/workshop/exercises/mapfiles/points.map b/workshop/exercises/mapfiles/points.map index a320a12..552b9c2 100644 --- a/workshop/exercises/mapfiles/points.map +++ b/workshop/exercises/mapfiles/points.map @@ -10,7 +10,7 @@ MAP METADATA "wms_enable_request" "*" "wms_srs" "EPSG:4326 EPSG:3857" - "wms_onlineresource" "http://localhost:5000/?map=/etc/mapserver/points.map&" + "wms_onlineresource" "http://localhost:7000/?map=/etc/mapserver/points.map&" END END SYMBOL @@ -92,4 +92,4 @@ MAP END END # CLASS ends here END # LAYER ends here -END # MAP ends here \ No newline at end of file +END # MAP ends here diff --git a/workshop/exercises/mapfiles/wfs.map b/workshop/exercises/mapfiles/wfs.map index 756e917..f1d351a 100644 --- a/workshop/exercises/mapfiles/wfs.map +++ b/workshop/exercises/mapfiles/wfs.map @@ -21,7 +21,7 @@ MAP "ows_enable_request" "*" # this enables all OGC requests "wfs_getfeature_formatlist" "geojson" "wfs_srs" "EPSG:4326 EPSG:3857" - "ows_onlineresource" "http://localhost:5000/" + "ows_onlineresource" "http://localhost:7000/" END END LAYER @@ -49,4 +49,4 @@ MAP END END END -END \ No newline at end of file +END