Project

General

Profile

MapRestServiceExamples » History » Version 58

Franck Theeten, 05/17/2013 04:41 PM

1 1 Andreas Kohlbecker
2 7 Andreas Kohlbecker
3 1 Andreas Kohlbecker
4 40 Niels Hoffmann
5 1 Andreas Kohlbecker
# Examples for URI requests to the Map REST Service
6 40 Niels Hoffmann
7
8
{{>toc}}
9
10 1 Andreas Kohlbecker
11
12 23 Pere Roca Ristol
Integrate clear colourful maps into your own website or application. Choose data sources and adapt colour, symbology, extent, background textures and line types to fully customise your map. 
13 1 Andreas Kohlbecker
14 23 Pere Roca Ristol
This page give some usage examples of the [[MapRestServiceApi|Map REST Service API]].
15
16 42 Niels Hoffmann
Be aware that these examples do *not conform to RFC 3986*, as the current implementation still doesn't follow the proposed syntaxis. It means that the syntaxis of these examples (and MapRest Services) may change in the coming weeks.
17 1 Andreas Kohlbecker
18 42 Niels Hoffmann
19 1 Andreas Kohlbecker
20 43 Niels Hoffmann
----
21 1 Andreas Kohlbecker
22
23 43 Niels Hoffmann
24 50 Franck Theeten
## WMS and Layers
25
26
27
The WMS bound to the service is http://edit.africamuseum.be/geoserver/ (don't forget the trailing slash).
28
29
30 57 Franck Theeten
Since December 2012, this service use the version 2.2.2 of GeoServer.
31 50 Franck Theeten
32 57 Franck Theeten
33
34 53 Franck Theeten
The services displays TDWG and vmap0 layers (http://gis-lab.info/qa/vmap0-eng.html) imported in the "topp" namespace.
35
36
37
38
The list of layers can be accessed by executing a WMS GetCapabilties request on the "topp" dataset: 
39
40
41
http://edit.africamuseum.be/geoserver/topp/wms?service=WMS&request=GetCapabilities.
42
43
44
45
Alternatively, you can also use the "preview layer" part of the graphical interface of GeoServer
46
47
http://edit.africamuseum.be/geoserver/web/;?wicket:bookmarkablePage=:org.geoserver.web.demo.MapPreviewPage
48
49
50
51 1 Andreas Kohlbecker
52 57 Franck Theeten
If you have requests or questions related to the available layers contact franck.theeten @ africamuseum.be
53 53 Franck Theeten
54
55
56
## Description of layers
57
58
59
Since 2011, any layer registered in the WMS can be used in distribution maps and have its style dynamically defined in the HTTP GET parameters (this functionnality was originally limited to TDWG layers).
60
61
62
When building a query, the programmer needs to know the structure of a layer (i.e. the name and the type of fields) since some functionnalities do not work on numeric attributes. For instance, you can define a filter to apply a style on specific values (like names of countries), but only if the corresponding attribute in the database has a text format (you cannot apply filter on integer column).
63
64
65
It is possible to get an XML describing the types and fieldnames of a layer by running a WFS query "DescribeFeature" on GeoServer like in the example below ("typename" being the name of the layer) 
66
67
68
e.g:
69
70
71
http://edit.africamuseum.be/geoserver/topp/wfs?service=WFS&version=1.1.0&request=DescribefeatureType&typename=topp:vmap0_afsa_hydro_inland_water_prm_only_a
72
73
74
75 54 Franck Theeten
=> in the answer "xsd:string" corresponds to attributes having a text type that can be used in filter. 
76
77
78
79 53 Franck Theeten
# Examples for URI requests to the Map REST Service
80
81
82
{{>toc}}
83
84
85
86
Integrate clear colourful maps into your own website or application. Choose data sources and adapt colour, symbology, extent, background textures and line types to fully customise your map. 
87
88
This page give some usage examples of the [[MapRestServiceApi|Map REST Service API]].
89
90
Be aware that these examples do *not conform to RFC 3986*, as the current implementation still doesn't follow the proposed syntaxis. It means that the syntaxis of these examples (and MapRest Services) may change in the coming weeks.
91
92
93
94
----
95
96
97
98
## WMS and Layers
99
100
101
The WMS bound to the service is http://edit.africamuseum.be/geoserver/ (don't forget the trailing slash).
102
103
104
105 50 Franck Theeten
The services is displays TDWG and vmap0 layers (http://gis-lab.info/qa/vmap0-eng.html) imported in the "topp" namespace.
106
107
108
109
The list of layers can be accessed by executing a WMS GetCapabilties request on the "topp" dataset: http://edit.africamuseum.be/geoserver/topp/wms?service=WMS&request=GetCapabilities.
110
111
112
113
Alternatively, you can also use the "preview layer" part of the graphical interface of GeoSerber
114
115
http://edit.africamuseum.be/geoserver/web/;?wicket:bookmarkablePage=:org.geoserver.web.demo.MapPreviewPage
116
117
118
119 1 Andreas Kohlbecker
120 51 Franck Theeten
If you have request or questions on the available layer contact franck.theeten @ africamuseum.be
121
122
123
124
## Description of layers
125
126 52 Franck Theeten
127 51 Franck Theeten
Since 2011, any layer registered in the WMS can be used in distribution maps and have its style dynamically defined in the HTTP GET parameters (this functionnality was originally limited to TDWG layers).
128
129 52 Franck Theeten
130 51 Franck Theeten
When building a query, the programmer needs to know the structure of a layer (i.e. the name and the type of fields) since some functionnalities do not work withnumeric attributes. For instance, you can define a filter to apply a style on specific values (like names of countries), but only if the correponding attribute in the database has a text format (you cannot apply filter on integer column).
131
132 1 Andreas Kohlbecker
133 53 Franck Theeten
It is possible to get an XML describing the types and fieldnames of a layer by running a WFS "DescribeFeature" query on GeoServer like in the example below ("typename" being the name of the layer) 
134 51 Franck Theeten
135
136
e.g:
137
138
139
http://edit.africamuseum.be/geoserver/topp/wfs?service=WFS&version=1.1.0&request=DescribefeatureType&typename=topp:vmap0_afsa_hydro_inland_water_prm_only_a
140 1 Andreas Kohlbecker
141 53 Franck Theeten
142
=> in the answer: "xsd:string" corresponds to attribute having a test format that can be used in filter. 
143 51 Franck Theeten
144
145 50 Franck Theeten
146
147
148 9 Andreas Kohlbecker
## Map REST Service - Version 1
149 3 Andreas Kohlbecker
150 1 Andreas Kohlbecker
_ Does not conform to the latest syntax definition! _
151
152
153 9 Andreas Kohlbecker
154 41 Niels Hoffmann
### Distribution Maps
155 9 Andreas Kohlbecker
156 35 Andreas Kohlbecker
Service URL: http://edit.br.fgov.be/edit_wp5/v1/areas.php
157 3 Andreas Kohlbecker
158 5 Andreas Kohlbecker
159 1 Andreas Kohlbecker
160 17 Andreas Müller
161 41 Niels Hoffmann
#### Basic Issues
162 17 Andreas Müller
163 24 Pere Roca Ristol
Map Image size is specified as 400 pixels width. It means the height will be 200 pixels (just the half). Attention: you cannot specify an odd number as width/height.
164
165
166 26 Pere Roca Ristol
A bounding box (bbox) is specified. We strongly recommend to use bbox if know it (for example if all your data is on the same zone).
167 25 Pere Roca Ristol
168 1 Andreas Kohlbecker
169 26 Pere Roca Ristol
We provide world country borders and all TDWG levels as background. This parameter must be specified in "l" parameter (l=earth in that example).
170
171
172
Current codes for background layers are:
173
174
175
-Country borders: earth
176
177
178
-TDWG level 1: tdwg1
179
180
181
-TDWG level 2: tdwg2
182
183
184
-TDWG level 3: tdwg3
185
186
187
-TDWG level 4: tdwg4
188
189
190 1 Andreas Kohlbecker
~~~
191 22 Pere Roca Ristol
<code class="html">
192 35 Andreas Kohlbecker
<img src="http://edit.br.fgov.be/edit_wp5/v1/areas.php?l=earth&ad=tdwg3:a:PHI,VAN,BAN,SRL,VIE,MOL,CHC,CRL,JAW,FIJ,SUM,MYA,MLY,NWG,MRN,AND,CHH,BOR,IND,CHS,THA,TAI,LAO,SUL,BIS,CBD,SOL,ASS&as=a:8dd3c7,,1&ms=500&bbox=-180,-90,180,90" />
193 1 Andreas Kohlbecker
~~~
194
195
~~~
196 6 Andreas Kohlbecker
l=earth&ad=tdwg3:a:PHI,VAN,BAN,SRL,VIE,MOL,CHC,CRL,JAW,FIJ,SUM,MYA,MLY,NWG,MRN,AND,CHH,BOR,IND,CHS,THA,TAI,LAO,SUL,BIS,CBD,SOL,ASS
197 34 Pere Roca Ristol
&as=a:8dd3c7,,1&ms=500&bbox=-180,-90,180,90
198 6 Andreas Kohlbecker
~~~
199
200
201 1 Andreas Kohlbecker
202 17 Andreas Müller
203 41 Niels Hoffmann
####  Recalculate Parameter
204 1 Andreas Kohlbecker
205 25 Pere Roca Ristol
We see here the "recalculate" parameter in action. 
206
207
When the bbox is not specified, the service will calculate it and try to fit the image to the specified dimensions (width/height). It can cause distorted images. 
208
209
210
Recalculate=true (this is the default if nothing is specified) tries to avoid these distortions. It means also that in some cases the final image size will change as you can see in the first image.
211
212
213
214 6 Andreas Kohlbecker
~~~
215
<code class="html">
216 35 Andreas Kohlbecker
<img src="http://edit.br.fgov.be/edit_wp5/v1/areas.php?l=earth&ad=tdwg3:a:PHI,VAN,BOR|b:BIS,SUM&as=a:8dd3c7,,2|b:e91f16,5be166,,2_4&ms=500&label=1" />
217 25 Pere Roca Ristol
~~~
218
~~~
219
<code class="html">
220 35 Andreas Kohlbecker
<img src="http://edit.br.fgov.be/edit_wp5/v1/areas.php?l=earth&ad=tdwg3:a:PHI,VAN,BOR|b:BIS,SUM&as=a:8dd3c7,,2|b:e91f16,5be166,,2_4&ms=500&label=1&recalculate=false" />
221 1 Andreas Kohlbecker
~~~
222
223 25 Pere Roca Ristol
~~~
224
l=earth&ad=tdwg3:a:PHI,VAN,BOR|b:BIS,SUM&as=a:8dd3c7,,2|b:e91f16,5be166,,2_4&ms=500&label=1
225
~~~
226 7 Andreas Kohlbecker
~~~
227
l=earth&ad=tdwg3:a:PHI,VAN,BOR|b:BIS,SUM&as=a:8dd3c7,,2|b:e91f16,5be166,,2_4&ms=500&label=1&recalculate=false
228
~~~
229
230
231 17 Andreas Müller
232 1 Andreas Kohlbecker
233 41 Niels Hoffmann
####  Different TDWG Layers
234 1 Andreas Kohlbecker
235 26 Pere Roca Ristol
You can mix different TDWG layers. In that case, TDWG level 3 and TDWG level 1.  
236
237
238
No background layer is defined, so you simply get the specified areas. 
239
240 7 Andreas Kohlbecker
~~~
241 1 Andreas Kohlbecker
<code class="html">
242 35 Andreas Kohlbecker
<img src="http://edit.br.fgov.be/edit_wp5/v1/areas.php?ad=tdwg3:b:ZIM|a:SPA,ITA||tdwg1:b:2&as=a:d7add2|b:ab8dc9F&ms=300,200&label=1" />
243 7 Andreas Kohlbecker
~~~
244
245
~~~
246 26 Pere Roca Ristol
ad=tdwg3:b:ZIM|a:SPA,ITA||tdwg1:b:2&as=a:d7add2|b:ab8dc9F&ms=600,300&label=1
247 1 Andreas Kohlbecker
~~~
248
249 3 Andreas Kohlbecker
250 1 Andreas Kohlbecker
251 41 Niels Hoffmann
#### Symbolize Parameters
252 34 Pere Roca Ristol
253 18 Andreas Müller
A more complex styling. The parameters for styling an area are:
254 27 Pere Roca Ristol
255 28 Pere Roca Ristol
256 27 Pere Roca Ristol
-Area fill color
257
258 28 Pere Roca Ristol
259 27 Pere Roca Ristol
-Area stroke color
260
261 28 Pere Roca Ristol
262 27 Pere Roca Ristol
-Area stroke width
263
264 28 Pere Roca Ristol
265 27 Pere Roca Ristol
-Area stroke dash style: we currently provide 1_2,1_4,2_2,2_4,5_7 and 10_5 but it can change. First parameter determine the length in pixels to draw the line, and the second, the length in pixels to blank out the line. As example, 5_7 means a very dashed line (separated 7 pixels one line from another).
266 1 Andreas Kohlbecker
267 27 Pere Roca Ristol
268 33 Pere Roca Ristol
269 28 Pere Roca Ristol
We allways provide default values. So, you could even specify styles "a" and "b"  as a:|b: and the image will be generated. 
270 27 Pere Roca Ristol
271 28 Pere Roca Ristol
A style like b:0000ff~2  would mean 0000ff fill color and 2 pixels stroke width. The other parameters would be set as default.
272 27 Pere Roca Ristol
273 28 Pere Roca Ristol
274 19 Andreas Müller
~~~
275 1 Andreas Kohlbecker
<code class="html">
276 35 Andreas Kohlbecker
<img src="http://edit.br.fgov.be/edit_wp5/v1/areas.php?l=tdwg1&ad=tdwg4:c:MXEDU|b:MXETA||tdwg3:a:MXC,CUB|b:MXE,MXG|c:MXS,MXT&as=a:329d2a,483eef,2,2_2|b:ab8dc9F,da1029,2,5_7|c:d2e347|d:f7555d&ms=500&bbox=-115,6.78,-75.19,29.8&recalculate=false" />
277 18 Andreas Müller
~~~
278 1 Andreas Kohlbecker
279 18 Andreas Müller
~~~
280 27 Pere Roca Ristol
l=tdwg1&ad=tdwg4:c:MXEDU|b:MXETA||tdwg3:a:MXC,CUB|b:MXE,MXG|c:MXS,MXT&as=a:329d2a,483eef,2,2_2|b:ab8dc9F,da1029,2,5_7|c:d2e347|d:f7555d&ms=700&bbox=-115,6.78,-75.19,29.8&recalculate=false
281 1 Andreas Kohlbecker
~~~
282
283 18 Andreas Müller
284 41 Niels Hoffmann
#### Map Legends
285 18 Andreas Müller
286 28 Pere Roca Ristol
A legend can be appended to your map in different positions. 
287 16 Andreas Kohlbecker
288 1 Andreas Kohlbecker
289 28 Pere Roca Ristol
Specify "title" parameter, associating to each style the desired legend. Also legend=1 and "mlp" (map legend position) 
290 1 Andreas Kohlbecker
291
292 28 Pere Roca Ristol
It is important to assign, for each style, a title, otherwise cause error.
293 1 Andreas Kohlbecker
294
295 34 Pere Roca Ristol
296 28 Pere Roca Ristol
The map legend position can be:
297 1 Andreas Kohlbecker
298 28 Pere Roca Ristol
299
-1: outside of the map, up left 
300
301
302
-2: outside of the map, up 
303
304
305
-3:outside of the map, up right 
306
307
308
-4: outside of the map, below left
309
310
311
-5: inside of the map, below right
312
313
314
-6:  inside of the map, below left
315
316
317
-7:  inside of the map, up right
318
319
320
321
~~~
322
<code class="html">
323 35 Andreas Kohlbecker
<img src="http://edit.br.fgov.be/edit_wp5/v1/areas.php?l=tdwg1&legend=1&mlp=3&title=a:foreign|b:native|c:rare|d:unknown&ad=tdwg4:c:MXEDU|b:MXETA||tdwg3:a:MXC,CUB|b:MXE,MXG|c:MXS,MXT&as=a:329d2a,483eef,2,2_2|b:ab8dc9F,da1029,2,5_7|c:d2e347|d:f7555d&ms=500&bbox=-115,6.78,-75.19,29.8&recalculate=false" />
324 28 Pere Roca Ristol
~~~
325
326 1 Andreas Kohlbecker
~~~
327 28 Pere Roca Ristol
l=tdwg1&legend=1&mlp=3&title=a:foreign|b:native|c:rare|d:unknown&ad=tdwg4:c:MXEDU|b:MXETA||tdwg3:a:MXC,CUB|b:MXE,MXG|c:MXS,MXT&as=a:329d2a,483eef,2,2_2|b:ab8dc9F,da1029,2,5_7|c:d2e347|d:f7555d&ms=500&bbox=-115,6.78,-75.19,29.8&recalculate=false
328 1 Andreas Kohlbecker
~~~
329 34 Pere Roca Ristol
A separate service generating legend is working, so you can put the legend wherever you want on your html. 
330 28 Pere Roca Ristol
331 34 Pere Roca Ristol
332
333 28 Pere Roca Ristol
~~~
334 1 Andreas Kohlbecker
<code class="html">
335 36 Andreas Kohlbecker
<img src="http://edit.br.fgov.be/edit_wp5/v1/legends.php?title=a:foreign|b:native|c:rare|d:unknown&as=a:329d2a,483eef,2,2_2|b:ab8dc9F,da1029,2,5_7|c:d2e347|d:f7555d&ms=60,50"/>
336 28 Pere Roca Ristol
~~~
337 29 Pere Roca Ristol
~~~
338 36 Andreas Kohlbecker
http://edit.br.fgov.be/edit_wp5/v1/legends.php?title=a:foreign|b:native|c:rare|d:unknown&as=a:329d2a,483eef,2,2_2|b:ab8dc9F,da1029,2,5_7|c:d2e347|d:f7555d&ms=60,50
339 1 Andreas Kohlbecker
~~~
340 29 Pere Roca Ristol
341
342
343 41 Niels Hoffmann
#### Hatching Patterns
344 29 Pere Roca Ristol
345 30 Pere Roca Ristol
You can also specify a hatch pattern. You need to fill "images_url" and  "symbols" for each pattern as shown below. The URL to the image can be remote or local.
346 1 Andreas Kohlbecker
347 29 Pere Roca Ristol
348 1 Andreas Kohlbecker
The second parameter of "symbols"  specifies the size of the image used for hatching.
349 30 Pere Roca Ristol
350 17 Andreas Müller
351 33 Pere Roca Ristol
~~~
352 16 Andreas Kohlbecker
<code class="html">
353 1 Andreas Kohlbecker
<img src="http://edit.br.fgov.be/edit_wp5/v1/areas.php?l=tdwg4&ad=tdwg4:c:MXEDU|b:MXETA|d:NICOO||tdwg3:a:MXC,CUB|b:MXE,MXG|c:MXS,MXT&as=b:d7add2,,3,|a:d7add2,ab899F,1,1_2|c:,,,10_5|d:&ms=500&images_url=a,c:edit.csic.es/v1/hatch_images|b:maps.massgis.state.ma.us/images&symbols=a,c:cow,10,gif|b:med_green_cross_hatch,30,gif&&bbox=-115,6.78,-75.19,29.8&recalculate=false"/>
354 35 Andreas Kohlbecker
~~~
355 1 Andreas Kohlbecker
~~~
356
l=tdwg4&ad=tdwg4:c:MXEDU|b:MXETA|d:NICOO||tdwg3:a:MXC,CUB|b:MXE,MXG|c:MXS,MXT&as=b:d7add2,,3,|a:d7add2,ab899F,1,1_2|c:,,,10_5|d:&ms=500&images_url=a,c:edit.csic.es/v1/hatch_images|b:maps.massgis.state.ma.us/images&symbols=a,c:cow,10,gif|b:med_green_cross_hatch,30,gif&&bbox=-115,6.78,-75.19,29.8&recalculate=false
357 30 Pere Roca Ristol
~~~
358 16 Andreas Kohlbecker
359
360 1 Andreas Kohlbecker
361 32 Pere Roca Ristol
#### Using MapRest on a webmapping application
362 30 Pere Roca Ristol
363 43 Niels Hoffmann
All these mapping services can be used on a dynamic webmapping application like [OpenLayers](http://openlayers.org/.) 
364 30 Pere Roca Ristol
365 1 Andreas Kohlbecker
366
The question is that, if desired, we return back not an image but a file that specifies the path to the XML that is used for layer symbolization. 
367 31 Pere Roca Ristol
368 32 Pere Roca Ristol
369 31 Pere Roca Ristol
With some little javascript coding you can get dynamic maps (zoom in/out, panning...).
370 1 Andreas Kohlbecker
371 30 Pere Roca Ristol
372
Some EDIT dataportals using this technology are PalmWeb (http://dev.e-taxonomy.eu/dataportal/palmae/) and Cichorieae (http://dev.e-taxonomy.eu/dataportal/cichorieae/)
373
374 1 Andreas Kohlbecker
375
How to get this file to be integrated on webmapping application? just specify "img=false" and will get a JSON file that could be something similar to...
376 30 Pere Roca Ristol
377
378
379 34 Pere Roca Ristol
[{[bbox]("-28.267,27.664,72.65,81.851",)
380 30 Pere Roca Ristol
381 36 Andreas Kohlbecker
[legend]("http://edit.br.fgov.be/edit_wp5/v1/sld/4e9b417a9789481932b57e53c47291c6.sld",) 
382 30 Pere Roca Ristol
383
384
[layers":[[{"tdwg" "tdwg3""session" """sld" "tdwg3_4e9b417a9789481932b57e53c47291c6sld"}|{"tdwg": "tdwg1","session": "","sld]() "tdwg1_4e9b417a9789481932b57e53c47291c6.sld"}]]}] 
385
386
387
388
As you can see, there is the name of XML (SLD) files that provide symbolization for each of specified TDWG layer. Also the legend is specified there.
389
390
391
With some javascript coding you can get dynamic maps. A big advantage of using these widgets is that they automatically calculate the scale at which the image has to be visualized. 
392
393
 By this way you can avoid distorted images that too often happen with "image" MapRest services.
394
395
396 16 Andreas Kohlbecker
397
398
399 41 Niels Hoffmann
### Occurrence Maps
400 1 Andreas Kohlbecker
401 36 Andreas Kohlbecker
Service URL: http://edit.br.fgov.be/edit_wp5/v1/points.php
402 4 Andreas Kohlbecker
403 1 Andreas Kohlbecker
404
MapRest services also can plot occurrences. Just specify each point data coordinates (in latitude/longitude) 
405
406
407 33 Pere Roca Ristol
This service is subject to changes soon.
408 32 Pere Roca Ristol
409 33 Pere Roca Ristol
410 32 Pere Roca Ristol
Current symbolization parameters are:
411 17 Andreas Müller
412 1 Andreas Kohlbecker
413 32 Pere Roca Ristol
-symbol: you can choose "c" (a circle),  "s" (a star), and "sq" (square)
414 20 Pere Roca Ristol
415 10 Andreas Kohlbecker
416 32 Pere Roca Ristol
-symbol size
417 10 Andreas Kohlbecker
418 13 Andreas Kohlbecker
419
-a name to be used on the legend
420 1 Andreas Kohlbecker
421
422 10 Andreas Kohlbecker
423 32 Pere Roca Ristol
424 33 Pere Roca Ristol
Also a "q_layer" has to be specified. It must be the same than the background layer and is used to calculate the bbox. 
425 1 Andreas Kohlbecker
426
427
428 34 Pere Roca Ristol
ATBI sites like Gemer (http://www.atbi.eu/gemer/) and Mercantour/Alpi-Marittime (http://www.atbi.eu/mercantour-marittime/) are already using this service.
429 33 Pere Roca Ristol
430
431 1 Andreas Kohlbecker
Also point occurrences can be mapped on a dynamic webmapping application but it is still not implemented.
432
433
434
435 14 Andreas Kohlbecker
~~~
436 8 Andreas Kohlbecker
<code class="html">
437 39 Niels Hoffmann
<img src="http://edit.br.fgov.be/edit_wp5/v1/points.php?l=v:e_w_0&od=1:38.326,-0.822|38.328,-0.542|38.062,-0.893||2:38.062,-0.893|38.012,-1.883||3:40.78,-4.009|43.461,-5.412|38.062,-0.893&os=1:c/f78755/10/Onthophagus%20semipunctatus|2:s/64cb48/10/Euoniticellus%20pallipes|3:sq/cbde4f/10/Onthophagus%20joannae&ms=700,350&bbox=-10,36,8,45&recalculate=true&legend=1" />
438 8 Andreas Kohlbecker
~~~
439
440
~~~
441 47 Franck Theeten
l=v:e_w_0&od=1:38.326,-0.822|38.328,-0.542|38.062,-0.893||2:38.062,-0.893|38.012,-1.883||3:40.78,-4.009|43.461,-5.412|38.062,-0.893&os=1:c/f78755/10/Onthophagus%20semipunctatus|2:s/64cb48/10/Euoniticellus%20pallipes|3:sq/cbde4f/10/Onthophagus%20joannae&ms=700,350&bbox=-10,36,8,45&recalculate=true&legend=1
442
~~~
443
444 49 Franck Theeten
445 47 Franck Theeten
446
447
## Map REST Service - Version 2
448
449 55 Franck Theeten
The major improvement of version 2 is that transparency can be applied both on point data and overlay layers.
450 47 Franck Theeten
451
452 1 Andreas Kohlbecker
453 57 Franck Theeten
454 47 Franck Theeten
### Distribution Maps
455
456
Service URL: 
457
458
http://edit.br.fgov.be/edit_wp5/v1.2/rest_gen.php
459
460
http://edit.br.fgov.be/edit_wp5/v1.2/points.php
461
462
http://edit.br.fgov.be/edit_wp5/v1.2/areas.php
463
464
465 56 Franck Theeten
"rest_gen.php" merges the functionnalities of points.php and areas.php. 
466 47 Franck Theeten
467 1 Andreas Kohlbecker
"points.php" and "areas.php" are still available as aliases to rest_gen for backward compatibility reasons.
468 57 Franck Theeten
469
470
471
#### Compatibility with OGC syntax
472
473
474
Since version 1.2, the service compliant with the syntax version 2.2.2 of GeoServer. 
475
476
477 58 Franck Theeten
Geoserver follows now more strictly the OGC syntax than before, especially for legends, a point which created an importantbackward compatibility issue when upgrading Geoservber.
478 57 Franck Theeten
479
480 58 Franck Theeten
Since GeoServer 2.2.1, the syntax of the “GetLegendGraphic” request used in the original version of the PHP script was not valid anymore.
481 1 Andreas Kohlbecker
482 57 Franck Theeten
483
484 58 Franck Theeten
The previous version had this element in the URL: “...geoserver/GetLegendGraphic?service=WMS&…” 
485 57 Franck Theeten
486
487
488 58 Franck Theeten
...while GeoServer awaits now: “...geoserver/wms?REQUEST=GetGraphicLegend&…”
489 57 Franck Theeten
490
491
This has been fixed in version 1.2 and also commited back to version 1.1 
492
493
494
495
#### Merging point and area data
496
497
498
499
#### Transparency on overlay layers