1 <html xmlns="http://www.w3.org/1999/xhtml">
3 <link rel="stylesheet" href="../../theme/default/style.css" type="text/css" />
4 <link rel="stylesheet" href="../../examples/style.css" type="text/css" />
5 <style type="text/css">
6 .olControlAttribution { bottom: 0px!important }
12 <script src='http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAjpkAC9ePGem0lIq5XcMiuhR_wWLPFku8Ix9i2SXYRVK3e45q1BQUd_beF8dtzKET_EteAjPdGDwqpQ'></script>
14 <script src="../../lib/OpenLayers.js"></script>
15 <script type="text/javascript">
17 // make map available for easy debugging
22 projection: new OpenLayers.Projection("EPSG:900913"),
23 displayProjection: new OpenLayers.Projection("EPSG:4326"),
25 maxResolution: 156543.0339,
26 maxExtent: new OpenLayers.Bounds(-20037508, -20037508,
27 20037508, 20037508.34)
29 map = new OpenLayers.Map('map', options);
31 // create Google Mercator layers
32 var gmap = new OpenLayers.Layer.Google(
34 {'sphericalMercator': true}
36 map.addLayers([gmap]);
37 map.addControl(new OpenLayers.Control.LayerSwitcher());
38 map.addControl(new OpenLayers.Control.Permalink());
39 map.addControl(new OpenLayers.Control.MousePosition());
40 var ovmap = new OpenLayers.Control.OverviewMap({
42 layers: [new OpenLayers.Layer.WMS("OpenLayers WMS",
43 "http://labs.metacarta.com/wms/vmap0",
46 map.addControl(ovmap);
47 ovmap.maximizeControl();
48 if (!map.getCenter()) {map.zoomToMaxExtent()};
52 <body onload="init()">
53 <h1 id="title">OpenLayers Overview Map Projection Test</h1>
58 Acceptance test for different projections in map and overview map.
59 The map uses EPSG:900913, the overview map EPSG:4326. Zoom the map and
60 drag both the map and the overview map to see it in action.
62 <div id="map" class="smallmap"></div>