OpenLayers OpenLayers

root/branches/openlayers/2.5/examples/gutter.html

Revision 4222, 1.9 kB (checked in by tschaub, 1 year ago)

exposing the map for firebuggers - and removing some crufty html comments

Line 
1 <html> 
2   <head>
3     <style type="text/css">
4         #map {
5             width: 500px;
6             height: 300px;
7             border: 1px solid gray;
8         }
9         p.caption {
10             width: 500px;
11         }
12     </style>
13     <script src="../lib/OpenLayers.js"></script>
14     <script type="text/javascript">
15         OpenLayers.IMAGE_RELOAD_ATTEMPTS = 2;
16         var map;
17         window.onload = function() {
18             options = {maxExtent: new OpenLayers.Bounds(-73.5295, 41.2318,
19                                                         -69.9097, 42.8883),
20                        maxResolution: 0.0003}
21             map = new OpenLayers.Map('map', options);
22             var roads15 = new OpenLayers.Layer.WMS( "Roads (15px gutter)"
23                 "http://boston.freemap.in/cgi-bin/mapserv?map=/www/freemap.in/boston/map/gmaps.map&",
24                 {layers: 'roads_200_40'},
25                 {gutter: 15}); 
26             var roads = new OpenLayers.Layer.WMS( "Roads (no gutter)"
27                 "http://boston.freemap.in/cgi-bin/mapserv?map=/www/freemap.in/boston/map/gmaps.map&",
28                 {layers: 'roads_200_40'}); 
29             map.addLayers([roads, roads15]);
30             map.addControl(new OpenLayers.Control.LayerSwitcher());
31             map.setCenter(new OpenLayers.LonLat(-71.848, 42.2), 0);
32         }
33     </script>
34   </head>
35   <body>
36     <h1>OpenLayers Gutter Example</h1>
37     <div id="map"></div>
38     <p class="caption">
39         When you render tiles with certain types of symbols, there are artifacts
40         at tile edges that make symbology not look continuous.  In the center of
41         the above map (when it first loads), the large orange road is split
42         vertically by a tile.  Open the layer switcher and change to the layer
43         with a 15 pixel gutter to see how the symbology looks nicer.
44     </p>
45          
46   </body>
47 </html>
Note: See TracBrowser for help on using the browser.