Skip to content

Commit 3c0242a

Browse files
committed
Update SLD page
1 parent 3eb2e17 commit 3c0242a

File tree

2 files changed

+24
-8
lines changed

2 files changed

+24
-8
lines changed

workshop/content/docs/advanced/sld.md

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,32 @@
1-
# Styled Layer Descriptor
1+
# Styled Layer Descriptor (SLD) in MapServer
2+
3+
## Overview
4+
5+
Styled Layer Descriptor (SLD) is an OGC standard used for describing styles. SLD files are written in XML.
6+
7+
SLD can be used by MapServer in several different ways:
8+
9+
1. Applying an SLD file to a WMS service
10+
11+
This exercise will focus on the first use case.
212

313
<div class="map">
414
<iframe src="https://geographika.github.io/getting-started-with-mapserver-demo/sld.html"></iframe>
515
</div>
616

17+
## Code
18+
19+
!!! example
20+
21+
- Direct MapServer request: <http://localhost:5000/?map=/etc/mapserver/lines.map&mode=map&layer=roads>
22+
- Local OpenLayers example: <http://localhost:5001/sld.html>
23+
-
724
???+ SLD
825

926
``` xml
1027
--8<-- "sld.xml"
1128
```
1229

13-
1430
??? JavaScript
1531

1632
``` js
@@ -23,10 +39,6 @@
2339
--8<-- "sld.map"
2440
```
2541

26-
http://localhost:5001/sld.html
27-
28-
Update SLD XML file (will need to refresh the browser)
29-
3042
http://localhost:5000/?map=/etc/mapserver/sld.map&REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.3.0
3143

3244
```xml
@@ -38,4 +50,8 @@ http://localhost:5000/?map=/etc/mapserver/sld.map&REQUEST=GetCapabilities&SERVIC
3850
```
3951

4052

41-
http://localhost:5000/?map=/etc/mapserver/sld.map&REQUEST=GetStyles&SERVICE=WMS&LAYERS=countries&VERSION=1.3.0&sld=http://node:5001/data/sld.xml
53+
http://localhost:5000/?map=/etc/mapserver/sld.map&REQUEST=GetStyles&SERVICE=WMS&LAYERS=countries&VERSION=1.3.0&sld=http://node:5001/data/sld.xml
54+
55+
## Exercises
56+
57+
1. Update SLD XML file. You will then need to refresh the browser to see any changes.

workshop/content/mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ nav:
88
- Home: index.md
99
- Workshop Environment Setup: setup.md
1010
- Introduction:
11-
- Introduction: introduction/introduction.md
11+
- Workshop Overview: introduction/introduction.md
1212
- Docker: introduction/docker.md
1313
- MapServer: introduction/mapserver.md
1414
- Command Line: introduction/commandline.md

0 commit comments

Comments
 (0)