]> dev.renevier.net Git - syp.git/blob - openlayers/examples/multimap-mercator.html
move templates to a specific directory
[syp.git] / openlayers / examples / multimap-mercator.html
1 <html xmlns="http://www.w3.org/1999/xhtml">
2   <head>
3     <title>MultiMap SphericalMercator</title>
4     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
5     <link rel="stylesheet" href="style.css" type="text/css" />
6     <style type="text/css">
7         #map {
8             width: 100%;
9             height: 512px;
10             border: 1px solid gray;
11         }
12     </style>
13
14
15     <script type="text/javascript" src="http://clients.multimap.com/API/maps/1.1/metacarta_04"></script>
16
17     <script src="../lib/OpenLayers.js"></script>
18     <script type="text/javascript">
19  
20         var map, ve, merc, vector;
21
22         function init(){
23             var options = {
24                 projection: "EPSG:900913",
25                 units: "m",
26                 maxResolution: 156543.0339,
27                 maxExtent: new OpenLayers.Bounds(-20037508, -20037508,
28                                                  20037508, 20037508)
29             };
30             map = new OpenLayers.Map('map', options);
31
32             ve = new OpenLayers.Layer.MultiMap(
33                 "multimap",
34                 {'sphericalMercator': true}
35             ); 
36             merc = new OpenLayers.Layer.WMS("World Map",
37                                             "http://world.freemap.in/tiles/",
38                                             {'layers': 'factbook-overlay',
39                                              'format':'png'},
40                                             {'reproject': false,
41                                              'opacity': 0.4,
42                                              'isBaseLayer': false,
43                                              'wrapDateLine': true});
44
45             // create a vector layer for drawing
46             vector = new OpenLayers.Layer.Vector("Editable Vectors");
47             
48             map.addLayers([ve, merc, vector]);
49             map.addControl(new OpenLayers.Control.LayerSwitcher());
50             map.addControl(new OpenLayers.Control.EditingToolbar(vector));
51             map.zoomToMaxExtent()
52         }
53         
54     </script>
55   </head>
56   <body onload="init()">
57     <h3 id="title">MultiMap Mercator Example</h3>
58     <p id="shortdesc">
59       This sphericalMercator example using multimap demonstrates that the
60       multimap layer does not fully support the sphericalMercator projection at
61       this time.
62     </p>  
63     <div id="map" class="smallmap"></div>
64   </body>
65 </html>