diff --git a/workshop/content/docs/advanced/arcgis.md b/workshop/content/docs/advanced/arcgis.md index ebeae88..192a076 100644 --- a/workshop/content/docs/advanced/arcgis.md +++ b/workshop/content/docs/advanced/arcgis.md @@ -173,9 +173,9 @@ labelsCheckbox.addEventListener('change', (event) => { !!! example - - Direct MapServer request: - - Direct MapServer request with labels: - - Local OpenLayers example: + - Direct MapServer request: + - Direct MapServer request with labels: + - Local OpenLayers example: ??? JavaScript "arcgis.js" diff --git a/workshop/content/docs/advanced/clusters.md b/workshop/content/docs/advanced/clusters.md index aa070eb..f49ae86 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" diff --git a/workshop/content/docs/advanced/gdalg.md b/workshop/content/docs/advanced/gdalg.md index 7e1452d..65d1230 100644 --- a/workshop/content/docs/advanced/gdalg.md +++ b/workshop/content/docs/advanced/gdalg.md @@ -125,8 +125,8 @@ LAYER !!! example - - Direct MapServer request: - - Local OpenLayers example: + - Direct MapServer request: + - Local OpenLayers example: ??? JavaScript "gdalg.js" diff --git a/workshop/content/docs/advanced/other-projections.md b/workshop/content/docs/advanced/other-projections.md index 9f7b252..3ef2f50 100644 --- a/workshop/content/docs/advanced/other-projections.md +++ b/workshop/content/docs/advanced/other-projections.md @@ -82,7 +82,7 @@ if we were to use the service-specific metadata items. !!! note The order of the layers in the Mapfile is important when requesting a map directly using the MapServer CGI interface - (for example ). + (for example ). The raster layer must be first in the Mapfile, otherwise the raster will be drawn on top of the vector layers and obscure them. The order of the layers in the request itself does not affect the rendering order, only the order in the Mapfile. @@ -235,8 +235,8 @@ const wcsSource = new ImageWMS({ !!! example - - MapServer request: - - OpenLayers example: + - MapServer request: + - OpenLayers example: ??? JavaScript "other-projections.js" @@ -270,7 +270,7 @@ const wcsSource = new ImageWMS({ 2. Update the Mapfile to use another non-EPSG projection, for example `ESRI:54030` (the [Robinson projection](https://en.wikipedia.org/wiki/Robinson_projection)). Test everything is configured correctly by making a direct request to the MapServer CGI interface - using . + using . ## Further Reading diff --git a/workshop/content/docs/advanced/sld.md b/workshop/content/docs/advanced/sld.md index ed33d9a..fdc8668 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/stac.md b/workshop/content/docs/advanced/stac.md index 763cde4..8023d1d 100644 --- a/workshop/content/docs/advanced/stac.md +++ b/workshop/content/docs/advanced/stac.md @@ -135,7 +135,7 @@ new ImageLayer({ !!! example - - Local OpenLayers example: + - Local OpenLayers example: ??? JavaScript "stac.js" diff --git a/workshop/content/docs/advanced/symbols.md b/workshop/content/docs/advanced/symbols.md index 883d2ed..204b0ce 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" diff --git a/workshop/content/docs/inputs/databases.md b/workshop/content/docs/inputs/databases.md index 37cf5ca..58b20b6 100644 --- a/workshop/content/docs/inputs/databases.md +++ b/workshop/content/docs/inputs/databases.md @@ -79,8 +79,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" @@ -98,7 +98,7 @@ Online example not available as no PostGIS installation on the server 1. Try to load another dataset into the database using the `gdal vector convert` 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 in the interactive map via WMS: ```js diff --git a/workshop/content/docs/inputs/raster.md b/workshop/content/docs/inputs/raster.md index 40dde4d..c75b805 100644 --- a/workshop/content/docs/inputs/raster.md +++ b/workshop/content/docs/inputs/raster.md @@ -85,8 +85,8 @@ A [COMPOSITE](https://mapserver.org/mapfile/composite.html) block is used to mak !!! example - - MapServer request: - - OpenLayers example: + - MapServer request: + - OpenLayers example: ??? JavaScript "raster.js" diff --git a/workshop/content/docs/inputs/vector.md b/workshop/content/docs/inputs/vector.md index 82daeaf..31d2da7 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 b4b4e3d..e3b4b6f 100644 --- a/workshop/content/docs/introduction/commandline.md +++ b/workshop/content/docs/introduction/commandline.md @@ -21,7 +21,7 @@ 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, making 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 1284cb8..afc6965 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/), a module that provides FastCGI support. -MapServer runs on port `8080` on the Docker container, which is mapped to port `7000` on the local machine, as can be seen in the Docker compose file +MapServer runs on port `8080` on the Docker container, which is mapped to port `9090` 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: geographika/mapserver-workshop:latest container_name: mapserver ports: - - 7000:8080 + - 9090:8080 environment: MAPSERVER_CONFIG_FILE: "/etc/mapserver/mapserver.conf" volumes: @@ -37,7 +37,7 @@ A second Docker container serves the JavaScript example pages. This uses Node an image: node:lts-slim container_name: node ports: - - 7001:7001 + - 9091:9091 working_dir: /home/node/app volumes: - ./app:/home/node/app @@ -55,8 +55,8 @@ A second Docker container serves the JavaScript example pages. This uses Node an # start docker in detached mode docker compose up -d # the following URLs should now be available - # http://localhost:7000 - # http://localhost:7001 + # http://localhost:9090 + # http://localhost:9091 # stop docker docker compose down diff --git a/workshop/content/docs/introduction/introduction.md b/workshop/content/docs/introduction/introduction.md index ba1e785..27adb8c 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 Docker Compose configuration file 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 set up and running at . -- Now try opening the following MapServer URL in your browser - +- Ensure that you have MapServer set up 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 Docker Compose configuration file ```bash docker compose up -d docker container ls # verify that the mapserver container is running - # visit http://localhost:7000 in your browser + # visit http://localhost:9090 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 63b949c..8a75d26 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/config.md b/workshop/content/docs/mapfile/config.md index c8ab113..05d849a 100644 --- a/workshop/content/docs/mapfile/config.md +++ b/workshop/content/docs/mapfile/config.md @@ -58,7 +58,7 @@ In the workshop configuration file, the following variables are set: on the incoming request host and path. - `OGCAPI_HTML_TEMPLATE_DIRECTORY "/usr/local/share/mapserver/ogcapi/templates/html-bootstrap/"` this setting points MapServer to the folder containing the Bootstrap HTML templates used when generating - the OGC API interface, for example at . + the OGC API interface, for example at . - `MS_INDEX_TEMPLATE_DIRECTORY "/usr/local/share/mapserver/ogcapi/templates/html-index-bootstrap/"` a similar setting, but used to point to the Bootstrap templates used when generating the MapServer [Index Pages](https://mapserver.org/output/index-page.html). @@ -104,17 +104,17 @@ The keys allow us to access the Mapfile using the URL in the form `http://server `?map=/etc/mapserver/lines.map` If we have set the `MS_INDEX_TEMPLATE_DIRECTORY` path in the `ENV` section above, then MapServer -will return an "Index Page", listing all these maps at the root of the MapServer URL: . +will return an "Index Page", listing all these maps at the root of the MapServer URL: . Clicking on one of these links takes you to an individual Mapfile Landing Page, which lists the -services available for that Mapfile, such as WMS, WFS, WCS, and OGC APIs. For example . +services available for that Mapfile, such as WMS, WFS, WCS, and OGC APIs. For example . ## Code !!! example - - MapServer Index Page request: - - MapServer Mapfile Landing Page example: + - MapServer Index Page request: + - MapServer Mapfile Landing Page example: ??? Config file "mapserver.conf" @@ -132,12 +132,12 @@ services available for that Mapfile, such as WMS, WFS, WCS, and OGC APIs. For ex - Add the Mapfile `./workshop/exercises/mapfiles/config.map` to the configuration file `./workshop/exercises/mapfiles/mapserver.conf`. Check it appears in the MapServer Index page - at . You will need to restart the MapServer container to see this change. + at . You will need to restart the MapServer container to see this change. - Enable the CGI functionality in the Mapfile by changing `"ms_enable_modes" "!*"` to `"*"` (or comment-out the whole line). This should create a new "OpenLayers Viewer" - link at . + link at . - Comment and uncomment the various `enable_request` `METADATA` items, and see how they affect - the available services for the Mapfile at . + the available services for the Mapfile at . !!! tip diff --git a/workshop/content/docs/mapfile/labels.md b/workshop/content/docs/mapfile/labels.md index e118d8e..b490899 100644 --- a/workshop/content/docs/mapfile/labels.md +++ b/workshop/content/docs/mapfile/labels.md @@ -41,9 +41,9 @@ GEOMTRANSFORM (centerline(densify([shape], 0.1))) !!! example - - Direct MapServer request: - - Inbuilt OpenLayers viewer: - - Local OpenLayers example: + - Direct MapServer request: + - Inbuilt OpenLayers viewer: + - Local OpenLayers example: ??? JavaScript "lakes.js" diff --git a/workshop/content/docs/mapfile/lines.md b/workshop/content/docs/mapfile/lines.md index a36a8df..33a4795 100644 --- a/workshop/content/docs/mapfile/lines.md +++ b/workshop/content/docs/mapfile/lines.md @@ -66,9 +66,9 @@ END !!! example - - Direct MapServer request: - - Inbuilt OpenLayers viewer: - - Local OpenLayers example: + - Direct MapServer request: + - Inbuilt OpenLayers viewer: + - Local OpenLayers example: !!! tip diff --git a/workshop/content/docs/mapfile/points.md b/workshop/content/docs/mapfile/points.md index d0e4058..90694da 100644 --- a/workshop/content/docs/mapfile/points.md +++ b/workshop/content/docs/mapfile/points.md @@ -50,7 +50,7 @@ We then reference this file in the Mapfile and use any of the font aliases for s In the example below we're using a cinema character from Google's [Material Symbols](https://fonts.google.com/icons). We specify the symbol using its HTML entity code in the [CHARACTER](https://mapserver.org/mapfile/symbol.html#mapfile-symbol-character) keyword. -A list of these codes and their associated symbols is available at [http://localhost:7001/fonts.html](http://localhost:7001/fonts.html). +A list of these codes and their associated symbols is available at [http://localhost:9091/fonts.html](http://localhost:9091/fonts.html). ```scala FONTSET "data/fonts/fontset.txt" @@ -66,9 +66,9 @@ END !!! example - - Direct MapServer request: - - Inbuilt OpenLayers viewer: - - Local OpenLayers example: + - Direct MapServer request: + - Inbuilt OpenLayers viewer: + - Local OpenLayers example: ??? JavaScript "points.js" @@ -86,7 +86,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 and 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.