Mercurial > dive4elements > gnv-client
comparison gnv/src/main/webapp/scripts/layers.jsp @ 988:556e16cc4da5
Switch to tiled layers with one tile to prevent problems in the layertree and the legendgraphicpanel
gnv/trunk@1176 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Tim Englich <tim.englich@intevation.de> |
---|---|
date | Tue, 08 Jun 2010 13:57:05 +0000 |
parents | a0e6566cd111 |
children | a406d8807e5d |
comparison
equal
deleted
inserted
replaced
987:42da41835b54 | 988:556e16cc4da5 |
---|---|
11 /** | 11 /** |
12 * XXX This application needs a layer that is stored in a variable called | 12 * XXX This application needs a layer that is stored in a variable called |
13 * 'layer'. So do not change the name of this variable. Just change the WMS | 13 * 'layer'. So do not change the name of this variable. Just change the WMS |
14 * layer itself. | 14 * layer itself. |
15 */ | 15 */ |
16 layer = new OpenLayers.Layer.WMS.Untiled( | 16 layer = new OpenLayers.Layer.WMS( |
17 "Background1", | 17 "Background1", |
18 "http://gdisrv.bsh.de/arcgis/services/Background/Background/MapServer/WMSServer?", | 18 "http://gdisrv.bsh.de/arcgis/services/Background/Background/MapServer/WMSServer?", |
19 { | 19 { |
20 layers: '0', | 20 layers: '0', |
21 format: 'image/png', | 21 format: 'image/png', |
22 transparent: false | 22 transparent: false |
23 }, | 23 }, |
24 { | 24 { |
25 isBaseLayer: true | 25 isBaseLayer: true, |
26 singletile: true | |
26 } | 27 } |
27 | 28 |
28 ); | 29 ); |
29 /** | 30 /** |
30 * XXX This application needs an ARRAY that stores some layers (or a single | 31 * XXX This application needs an ARRAY that stores some layers (or a single |
39 Iterator<Layer> it = localMapService.getLayer().iterator(); | 40 Iterator<Layer> it = localMapService.getLayer().iterator(); |
40 int i = 1; | 41 int i = 1; |
41 while (it.hasNext()){ | 42 while (it.hasNext()){ |
42 Layer layer = it.next(); | 43 Layer layer = it.next(); |
43 %> | 44 %> |
44 layer<%=i%> = new OpenLayers.Layer.WMS.Untiled( | 45 layer<%=i%> = new OpenLayers.Layer.WMS( |
45 "<%=layer.getID() %>", | 46 "<%=layer.getID() %>", |
46 "<%=localMapService.getURL() %>", | 47 "<%=localMapService.getURL() %>", |
47 { | 48 { |
48 layers: '<%=layer.getName()%>', | 49 layers: '<%=layer.getName()%>', |
49 format: 'image/png', | 50 format: 'image/png', |
50 transparent: true | 51 transparent: true |
51 }, | 52 }, |
52 { | 53 { |
53 isBaseLayer: false | 54 isBaseLayer: false, |
55 singletile: true | |
54 } | 56 } |
55 | 57 |
56 ); | 58 ); |
57 layers[<%=i%>] = layer<%=i++%>; | 59 layers[<%=i%>] = layer<%=i++%>; |
58 <%}%> | 60 <%}%> |