Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions workshop/content/docs/advanced/arcgis.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,9 @@ labelsCheckbox.addEventListener('change', (event) => {

!!! example

- Direct MapServer request: <http://localhost:7000/?map=/etc/mapserver/arcgis.map&REQUEST=GetMap&SERVICE=WMS&VERSION=1.3.0&FORMAT=image%2Fpng&STYLES=&TRANSPARENT=TRUE&LAYERS=PoolPermits&WIDTH=3840&HEIGHT=1907&CRS=EPSG%3A3857&BBOX=-13076703%2C4014686%2C-13072117.389151445%2C4016958>
- Direct MapServer request with labels: <http://localhost:7000/?map=/etc/mapserver/arcgis.map&REQUEST=GetMap&SERVICE=WMS&VERSION=1.3.0&FORMAT=image%2Fpng&STYLES=&TRANSPARENT=TRUE&LAYERS=PoolPermits&LABELS=visible&WIDTH=3840&HEIGHT=1907&CRS=EPSG%3A3857&BBOX=-13076703%2C4014686%2C-13072117.389151445%2C4016958>
- Local OpenLayers example: <http://localhost:7001/arcgis.html>
- Direct MapServer request: <http://localhost:9090/?map=/etc/mapserver/arcgis.map&REQUEST=GetMap&SERVICE=WMS&VERSION=1.3.0&FORMAT=image%2Fpng&STYLES=&TRANSPARENT=TRUE&LAYERS=PoolPermits&WIDTH=3840&HEIGHT=1907&CRS=EPSG%3A3857&BBOX=-13076703%2C4014686%2C-13072117.389151445%2C4016958>
- Direct MapServer request with labels: <http://localhost:9090/?map=/etc/mapserver/arcgis.map&REQUEST=GetMap&SERVICE=WMS&VERSION=1.3.0&FORMAT=image%2Fpng&STYLES=&TRANSPARENT=TRUE&LAYERS=PoolPermits&LABELS=visible&WIDTH=3840&HEIGHT=1907&CRS=EPSG%3A3857&BBOX=-13076703%2C4014686%2C-13072117.389151445%2C4016958>
- Local OpenLayers example: <http://localhost:9091/arcgis.html>

??? JavaScript "arcgis.js"

Expand Down
4 changes: 2 additions & 2 deletions workshop/content/docs/advanced/clusters.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ CLASS

!!! example

- MapServer request: <http://localhost:7000/?map=/etc/mapserver/clusters.map&mode=map&layer=trees>
- OpenLayers example: <http://localhost:7001/clusters.html>
- MapServer request: <http://localhost:9090/?map=/etc/mapserver/clusters.map&mode=map&layer=trees>
- OpenLayers example: <http://localhost:9091/clusters.html>

??? JavaScript "clusters.js"

Expand Down
4 changes: 2 additions & 2 deletions workshop/content/docs/advanced/gdalg.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ LAYER

!!! example

- Direct MapServer request: <http://localhost:7000/?map=/etc/mapserver/gdalg.map&REQUEST=GetMap&SERVICE=WMS&VERSION=1.3.0&FORMAT=image%2Fpng&STYLES=&TRANSPARENT=TRUE&LAYERS=buffered_roads%2Croads&WIDTH=1707&HEIGHT=848&CRS=EPSG%3A3857&BBOX=2974643.6269619283%2C8046226.818245997%2C2976682.478528896%2C8047239.608870775>
- Local OpenLayers example: <http://localhost:7001/gdalg.html>
- Direct MapServer request: <http://localhost:9090/?map=/etc/mapserver/gdalg.map&REQUEST=GetMap&SERVICE=WMS&VERSION=1.3.0&FORMAT=image%2Fpng&STYLES=&TRANSPARENT=TRUE&LAYERS=buffered_roads%2Croads&WIDTH=1707&HEIGHT=848&CRS=EPSG%3A3857&BBOX=2974643.6269619283%2C8046226.818245997%2C2976682.478528896%2C8047239.608870775>
- Local OpenLayers example: <http://localhost:9091/gdalg.html>

??? JavaScript "gdalg.js"

Expand Down
8 changes: 4 additions & 4 deletions workshop/content/docs/advanced/other-projections.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <http://localhost:7000/?map=/etc/mapserver/other-projections.map&mode=map&layer=countries&layer=cities&layer=raster>).
(for example <http://localhost:9090/?map=/etc/mapserver/other-projections.map&mode=map&layer=countries&layer=cities&layer=raster>).
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.

Expand Down Expand Up @@ -235,8 +235,8 @@ const wcsSource = new ImageWMS({

!!! example

- MapServer request: <http://localhost:7000/?map=/etc/mapserver/other-projections.map&mode=map&layer=countries&layer=cities&layer=raster>
- OpenLayers example: <http://localhost:7001/other-projections.html>
- MapServer request: <http://localhost:9090/?map=/etc/mapserver/other-projections.map&mode=map&layer=countries&layer=cities&layer=raster>
- OpenLayers example: <http://localhost:9091/other-projections.html>

??? JavaScript "other-projections.js"

Expand Down Expand Up @@ -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 <http://localhost:7000/?map=/etc/mapserver/other-projections.map&mode=map&layer=countries&layer=cities&layer=raster>.
using <http://localhost:9090/?map=/etc/mapserver/other-projections.map&mode=map&layer=countries&layer=cities&layer=raster>.


## Further Reading
Expand Down
8 changes: 4 additions & 4 deletions workshop/content/docs/advanced/sld.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ This exercise will focus on the first use case.

!!! example

- Direct MapServer request: <http://localhost:7000/?map=/etc/mapserver/lines.map&mode=map&layer=roads>
- Local OpenLayers example: <http://localhost:7001/sld.html>
- GetCapabilities request: <http://localhost:7000/?map=/etc/mapserver/sld.map&REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.3.0>
- Request to generate SLD from a Mapfile: <http://localhost:7000/?map=/etc/mapserver/sld.map&REQUEST=GetStyles&SERVICE=WMS&LAYERS=countries&VERSION=1.3.0&sld=http://node:7001/data/sld.xml>
- Direct MapServer request: <http://localhost:9090/?map=/etc/mapserver/lines.map&mode=map&layer=roads>
- Local OpenLayers example: <http://localhost:9091/sld.html>
- GetCapabilities request: <http://localhost:9090/?map=/etc/mapserver/sld.map&REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.3.0>
- Request to generate SLD from a Mapfile: <http://localhost:9090/?map=/etc/mapserver/sld.map&REQUEST=GetStyles&SERVICE=WMS&LAYERS=countries&VERSION=1.3.0&sld=http://node:9091/data/sld.xml>

???+ SLD

Expand Down
2 changes: 1 addition & 1 deletion workshop/content/docs/advanced/stac.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ new ImageLayer({

!!! example

- Local OpenLayers example: <http://localhost:7001/stac.html>
- Local OpenLayers example: <http://localhost:9091/stac.html>

??? JavaScript "stac.js"

Expand Down
4 changes: 2 additions & 2 deletions workshop/content/docs/advanced/symbols.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ END

!!! example

- Direct MapServer request: <http://localhost:7000/?map=/etc/mapserver/railways.map&mode=map&layer=roads>
- Local OpenLayers example: <http://localhost:7001/railways.html>
- Direct MapServer request: <http://localhost:9090/?map=/etc/mapserver/railways.map&mode=map&layer=roads>
- Local OpenLayers example: <http://localhost:9091/railways.html>

??? JavaScript "railways.js"

Expand Down
6 changes: 3 additions & 3 deletions workshop/content/docs/inputs/databases.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ Online example not available as no PostGIS installation on the server

!!! example "Exercise Links"

- MapServer request: <http://localhost:7000/?map=/etc/mapserver/postgis.map&mode=map&layer=water>
- OpenLayers example: <http://localhost:7001/postgis.html>
- MapServer request: <http://localhost:9090/?map=/etc/mapserver/postgis.map&mode=map&layer=water>
- OpenLayers example: <http://localhost:9091/postgis.html>

??? JavaScript "postgis.js"

Expand All @@ -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:
<http://localhost:7000/?map=/etc/mapserver/postgis.map&mode=map&layers=water%20NEWLAYERNAME>.
<http://localhost:9090/?map=/etc/mapserver/postgis.map&mode=map&layers=water%20NEWLAYERNAME>.
3. Now update the JS file so the layer is visible in the interactive map via WMS:

```js
Expand Down
4 changes: 2 additions & 2 deletions workshop/content/docs/inputs/raster.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ A [COMPOSITE](https://mapserver.org/mapfile/composite.html) block is used to mak

!!! example

- MapServer request: <http://localhost:7000/?map=/etc/mapserver/raster.map&mode=map&layer=dtm>
- OpenLayers example: <http://localhost:7001/raster.html>
- MapServer request: <http://localhost:9090/?map=/etc/mapserver/raster.map&mode=map&layer=dtm>
- OpenLayers example: <http://localhost:9091/raster.html>

??? JavaScript "raster.js"

Expand Down
4 changes: 2 additions & 2 deletions workshop/content/docs/inputs/vector.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ than a huge GeoTIFF file.

!!! example

- MapServer request: <http://localhost:7000/?map=/etc/mapserver/stars.map&mode=map&layer=constellations>
- OpenLayers example: <http://localhost:7001/stars.html>
- MapServer request: <http://localhost:9090/?map=/etc/mapserver/stars.map&mode=map&layer=constellations>
- OpenLayers example: <http://localhost:9091/stars.html>

??? JavaScript "stars.js"

Expand Down
2 changes: 1 addition & 1 deletion workshop/content/docs/introduction/commandline.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <http://localhost:7000/?map=/etc/mapserver/countries.map&mode=map> run the following command:
To test a URL such as <http://localhost:9090/?map=/etc/mapserver/countries.map&mode=map> run the following command:

```bash
mapserv "QUERY_STRING=map=/etc/mapserver/countries.map&mode=map"
Expand Down
10 changes: 5 additions & 5 deletions workshop/content/docs/introduction/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ 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
mapserver:
image: geographika/mapserver-workshop:latest
container_name: mapserver
ports:
- 7000:8080
- 9090:8080
environment:
MAPSERVER_CONFIG_FILE: "/etc/mapserver/mapserver.conf"
volumes:
Expand All @@ -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
Expand All @@ -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
Expand Down
8 changes: 4 additions & 4 deletions workshop/content/docs/introduction/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ setup provided to you is actually working. The Docker Compose configuration file
docker compose up
```

2. Open <http://localhost:7000> in your browser, you should see an error message!
2. Open <http://localhost:9090> 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 <http://localhost:7000>.
- Now try opening the following MapServer URL in your browser - <http://localhost:7000/?map=/etc/mapserver/countries.map&mode=map>
- Ensure that you have MapServer set up and running at <http://localhost:9090>.
- Now try opening the following MapServer URL in your browser - <http://localhost:9090/?map=/etc/mapserver/countries.map&mode=map>


!!! note
Expand All @@ -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
```
Expand Down
2 changes: 1 addition & 1 deletion workshop/content/docs/introduction/openlayers.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <http://localhost:7001/>.
running an index page for all workshop exercises is available at <http://localhost:9091/>.

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.
Expand Down
16 changes: 8 additions & 8 deletions workshop/content/docs/mapfile/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <http://localhost:7000/timisoara/ogcapi/?f=html>.
the OGC API interface, for example at <http://localhost:9090/timisoara/ogcapi/?f=html>.
- `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).
Expand Down Expand Up @@ -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: <http://localhost:7000/>.
will return an "Index Page", listing all these maps at the root of the MapServer URL: <http://localhost:9090/>.

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 <http://localhost:7000/timisoara/>.
services available for that Mapfile, such as WMS, WFS, WCS, and OGC APIs. For example <http://localhost:9090/timisoara/>.

## Code

!!! example

- MapServer Index Page request: <http://localhost:7000/>
- MapServer Mapfile Landing Page example: <http://localhost:7000/timisoara/>
- MapServer Index Page request: <http://localhost:9090/>
- MapServer Mapfile Landing Page example: <http://localhost:9090/timisoara/>

??? Config file "mapserver.conf"

Expand All @@ -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 <http://localhost:7000/>. You will need to restart the MapServer container to see this change.
at <http://localhost:9090/>. 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 <http://localhost:7000/CONFIG_MAP/>.
link at <http://localhost:9090/CONFIG_MAP/>.
- Comment and uncomment the various `enable_request` `METADATA` items, and see how they affect
the available services for the Mapfile at <http://localhost:7000/CONFIG_MAP/>.
the available services for the Mapfile at <http://localhost:9090/CONFIG_MAP/>.

!!! tip

Expand Down
6 changes: 3 additions & 3 deletions workshop/content/docs/mapfile/labels.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ GEOMTRANSFORM (centerline(densify([shape], 0.1)))

!!! example

- Direct MapServer request: <http://localhost:7000/?map=/etc/mapserver/lakes.map&mode=map&layer=lakes&layer=lake-labels>
- Inbuilt OpenLayers viewer: <http://localhost:7000/lakes/?template=openlayers&mode=browse&layers=all>
- Local OpenLayers example: <http://localhost:7001/lakes.html>
- Direct MapServer request: <http://localhost:9090/?map=/etc/mapserver/lakes.map&mode=map&layer=lakes&layer=lake-labels>
- Inbuilt OpenLayers viewer: <http://localhost:9090/lakes/?template=openlayers&mode=browse&layers=all>
- Local OpenLayers example: <http://localhost:9091/lakes.html>

??? JavaScript "lakes.js"

Expand Down
6 changes: 3 additions & 3 deletions workshop/content/docs/mapfile/lines.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ END

!!! example

- Direct MapServer request: <http://localhost:7000/?map=/etc/mapserver/lines.map&mode=map&layer=roads>
- Inbuilt OpenLayers viewer: <http://localhost:7000/lines/?template=openlayers&mode=browse&layers=all>
- Local OpenLayers example: <http://localhost:7001/lines.html>
- Direct MapServer request: <http://localhost:9090/?map=/etc/mapserver/lines.map&mode=map&layer=roads>
- Inbuilt OpenLayers viewer: <http://localhost:9090/lines/?template=openlayers&mode=browse&layers=all>
- Local OpenLayers example: <http://localhost:9091/lines.html>

!!! tip

Expand Down
10 changes: 5 additions & 5 deletions workshop/content/docs/mapfile/points.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -66,9 +66,9 @@ END

!!! example

- Direct MapServer request: <http://localhost:7000/?map=/etc/mapserver/points.map&mode=map&layer=pois>
- Inbuilt OpenLayers viewer: <http://localhost:7000/points/?template=openlayers&mode=browse&layers=all>
- Local OpenLayers example: <http://localhost:7001/points.html>
- Direct MapServer request: <http://localhost:9090/?map=/etc/mapserver/points.map&mode=map&layer=pois>
- Inbuilt OpenLayers viewer: <http://localhost:9090/points/?template=openlayers&mode=browse&layers=all>
- Local OpenLayers example: <http://localhost:9091/points.html>

??? JavaScript "points.js"

Expand All @@ -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 <http://localhost:7001/fonts.html>. 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 <http://localhost:9091/fonts.html>. 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.

<!--

Expand Down
6 changes: 3 additions & 3 deletions workshop/content/docs/mapfile/polygons.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ CLASS

!!! example

- Direct MapServer request: <http://localhost:7000/?map=/etc/mapserver/polygons.map&mode=map&layer=buildings>
- Inbuilt OpenLayers viewer: <http://localhost:7000/polygons/?template=openlayers&mode=browse&layers=all>
- Local OpenLayers example: <http://localhost:7001/polygons.html>
- Direct MapServer request: <http://localhost:9090/?map=/etc/mapserver/polygons.map&mode=map&layer=buildings>
- Inbuilt OpenLayers viewer: <http://localhost:9090/polygons/?template=openlayers&mode=browse&layers=all>
- Local OpenLayers example: <http://localhost:9091/polygons.html>

!!! tip

Expand Down
Loading