]> dev.renevier.net Git - syp.git/blob - openlayers/examples/ve-novibrate.html
real api and clearer separation between server and client
[syp.git] / openlayers / examples / ve-novibrate.html
1 <html xmlns="http://www.w3.org/1999/xhtml"> \r
2   <head> \r
3       <title>OpenLayers Virtual Earth Example</title> \r
4     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" /> \r
5     <link rel="stylesheet" href="style.css" type="text/css" /> \r
6     <script src='http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.1'></script> \r
7  \r
8     <script src="../lib/OpenLayers.js"></script> \r
9     <script type="text/javascript"> \r
10  \r
11         var map, velayer, layer;\r
12  \r
13         function init(){\r
14             map = new OpenLayers.Map('map', {\r
15                 controls: [new OpenLayers.Control.Navigation()],\r
16                 panMethod: OpenLayers.Easing.Linear.easeOut,\r
17                 panDuration: 10\r
18             });\r
19  \r
20             velayer = new OpenLayers.Layer.VirtualEarth("VE", {\r
21                 minZoomLevel: 2, \r
22                 maxZoomLevel: 6, \r
23                 type: VEMapStyle.Road\r
24             });\r
25             map.addLayer(velayer);\r
26  \r
27             map.setCenter(new OpenLayers.LonLat(25, 25), 0);\r
28             \r
29             map.addControl( new OpenLayers.Control.PanZoomBar() );\r
30 \r
31             markers = new OpenLayers.Layer.Markers("markers");\r
32             map.addLayer(markers);\r
33             \r
34             for(var i=0;i<100;i++){\r
35                 var lat= Math.floor(Math.random()*50);\r
36                 var lon= Math.floor(Math.random()*50);\r
37                 var lonLat=new OpenLayers.LonLat(lon,lat);\r
38                                 var marker=new OpenLayers.Marker(lonLat);\r
39                                 markers.addMarker(marker);\r
40             }\r
41             \r
42         }\r
43  \r
44     </script> \r
45   </head> \r
46   <body onload="init()"> \r
47     <h1 id="title">Virtual Earth Example</h1> \r
48  \r
49     <div id="tags"></div> \r
50  \r
51     <p id="shortdesc"> \r
52         When using the PanZoom buttons with VirtualEarth, some 'drift' is \r
53         possible in markers. This page demonstrates how to use the \r
54         panMethod and panDuration properties to change the OpenLayers \r
55         settings to match VirtualEarth. \r
56     </p> \r
57  \r
58     <div id="map" class="smallmap"></div> \r
59   </body> \r
60 </html> \r
61  \r
62  \r