Skip to content

Commit e55da0f

Browse files
committed
Update to use Mostar data
1 parent 7ef547d commit e55da0f

File tree

8 files changed

+25
-25
lines changed

8 files changed

+25
-25
lines changed

workshop/content/docs/mapfile/points.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
## Overview
44

5-
In this exercise we'll create a map of POIs (Points of Interest) from OpenStreetMap.
5+
In this exercise we'll create a map of POIs (Points of Interest) from OpenStreetMap for Mostar, Bosnia-Herzegovina - the host
6+
city for [FOSS4G Europe 2025](https://2025.europe.foss4g.org/).
67

78
<div class="map">
89
<iframe src="https://geographika.github.io/getting-started-with-mapserver-demo/points.html"></iframe>
@@ -67,13 +68,13 @@ END
6768
- Direct MapServer request: <http://localhost:5000/?map=/etc/mapserver/points.map&mode=map&layer=pois>
6869
- Local OpenLayers example: <http://localhost:5001/points.html>
6970

70-
??? JavaScript
71+
??? JavaScript "points.js"
7172

7273
``` js
7374
--8<-- "points.js"
7475
```
7576

76-
??? Mapfile
77+
??? Mapfile "points.map"
7778

7879
``` scala
7980
--8<-- "points.map"

workshop/content/docs/mapfile/polygons.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Overview
44

5-
This exercise displays building from OpenStreetMap.
5+
This exercise displays buildings from OpenStreetMap.
66

77
<div class="map">
88
<iframe src="https://geographika.github.io/getting-started-with-mapserver-demo/polygons.html"></iframe>
@@ -33,16 +33,16 @@ END
3333

3434
## Expressions
3535

36-
In this Mapfile we have two different classes for the dataset.
36+
In this Mapfile we have two different classes for the dataset.
3737

3838
The first class has an [EXPRESSION](https://mapserver.org/mapfile/expressions.htm) that limits
39-
which features will be drawn. This compares the value for the "type" field for each feature with "office".
39+
which features will be drawn. This compares the value for the "type" field for each feature with "university".
4040
If there is a match then the feature is drawn with the `STYLE`s from the `CLASS`.
4141

4242
```scala
4343
CLASS
44-
GROUP "offices"
45-
EXPRESSION ( "[type]" = "office" )
44+
GROUP "university"
45+
EXPRESSION ( "[type]" = "university" )
4646
...
4747
```
4848

@@ -79,22 +79,22 @@ CLASS
7979

8080
??? Mapfile "polygons.map"
8181

82-
``` scala title="polygons.map"
82+
``` scala
8383
--8<-- "polygons.map"
8484
```
8585

8686
## Exercises
8787

88-
1. Switch the `CLASSGROUP` in the Mapfile to see different styles. There are two groups `offices` and `other`.
88+
1. Switch the `CLASSGROUP` in the Mapfile to see different styles. There are two groups `university` and `other`.
8989

9090
```scala
9191
LAYER
9292
NAME "buildings"
9393
...
94-
CLASSGROUP "offices" # can switch the default set of CLASSes here
94+
CLASSGROUP "university" # can switch the default set of CLASSes here
9595
```
9696

97-
2. Switch the style used in the `polygon.js` file from `offices` to `other`:
97+
2. Switch the style used in the `polygon.js` file from `university` to `other`:
9898

9999
```js
100100
source: new ImageWMS({

workshop/exercises/app/js/points.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const mapfilesPath = import.meta.env.VITE_MAPFILES_PATH;
1111
const layers = [
1212
new TileLayer({
1313
source: new OSM(),
14-
visible: true
14+
visible: false
1515
}),
1616
new ImageLayer({
1717
source: new ImageWMS({
@@ -24,7 +24,7 @@ const map = new Map({
2424
layers: layers,
2525
target: 'map',
2626
view: new View({
27-
center: [2975862.75916499, 8046369.8646329],
27+
center: [1982884, 5363834],
2828
zoom: 14,
2929
}),
3030
});

workshop/exercises/app/js/polygons.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,9 @@ const layers = [
1313
source: new OSM(),
1414
}),
1515
new ImageLayer({
16-
extent: [2968743.65508978, 8038921.67212233, 2982981.8632402, 8053818.05714347],
1716
source: new ImageWMS({
1817
url: mapserverUrl + mapfilesPath + 'polygons.map&',
19-
params: { 'LAYERS': 'buildings', 'STYLES': 'offices' },
18+
params: { 'LAYERS': 'buildings', 'STYLES': 'university' },
2019
ratio: 1
2120
}),
2221
}),
@@ -25,7 +24,7 @@ const map = new Map({
2524
layers: layers,
2625
target: 'map',
2726
view: new View({
28-
center: [2975862.75916499, 8046369.8646329],
27+
center: [1982884, 5363834],
2928
zoom: 14,
3029
}),
3130
});
1.74 MB
Binary file not shown.
249 KB
Binary file not shown.

workshop/exercises/mapfiles/points.map

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ MAP
4646
STATUS ON
4747
TYPE POINT # each LAYER must have a TYPE such as POINT, LINE, or POLYGON
4848
CONNECTIONTYPE FLATGEOBUF
49-
DATA "data/osm/pois.fgb"
49+
DATA "data/osm/mostar/pois.fgb"
5050
CLASSITEM "fclass"
5151
# data within a LAYER is classified using one or more CLASSes
5252
# these use EXPRESSIONs to define which features are assigned to

workshop/exercises/mapfiles/polygons.map

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MAP
22
NAME "Buildings"
3-
EXTENT 26.668678 58.339241 26.796582 58.40941
3+
EXTENT 17 43 18 44
44
UNITS DD
55
SIZE 800 600
66
PROJECTION
@@ -19,13 +19,13 @@ MAP
1919
STATUS OFF
2020
CONNECTIONTYPE OGR
2121
# CONNECTIONTYPE FLATGEOBUF
22-
# DATA "data/osm/buildings_a.fgb"
23-
CONNECTION "data/osm/buildings_a.fgb"
24-
CLASSGROUP "offices" # we can switch the default set of CLASSes here
22+
# DATA "data/osm/mostar/buildings_a.fgb"
23+
CONNECTION "data/osm/mostar/buildings_a.fgb"
24+
CLASSGROUP "university" # we can switch the default set of CLASSes here
2525
CLASS
26-
NAME "Offices" # this value is used for Legend titles for the CLASS
27-
GROUP "offices"
28-
EXPRESSION ( "[type]" = "office" )
26+
NAME "University" # this value is used for Legend titles for the CLASS
27+
GROUP "university"
28+
EXPRESSION ( "[type]" = "university" )
2929
STYLE
3030
COLOR 255 0 0
3131
OUTLINECOLOR 0 0 0

0 commit comments

Comments
 (0)