Advertisement
TLama

Untitled

May 23rd, 2013
257
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.01 KB | None | 0 0
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  2. <html>
  3.    
  4.     <head>
  5.         <script src="http://openlayers.org/api/OpenLayers.js"></script>
  6.         <script src="http://maps.google.com/maps/api/js?v=3.2&sensor=false"></script>        
  7.         <script>
  8.             function moveByPixel(X, Y) {
  9.                 map.pan(X, Y);
  10.             }
  11.  
  12.             function init() {
  13.                 map = new OpenLayers.Map("mapElementId", {
  14.                     controls: [new OpenLayers.Control.Navigation()]
  15.                 });
  16.  
  17.                 var googleMapsLayer = new OpenLayers.Layer.Google();
  18.                 map.addLayer(googleMapsLayer);
  19.  
  20.                 var position = new OpenLayers.LonLat(14.4944, 50.078735).transform('EPSG:4326', 'EPSG:3857');
  21.                 var zoom = 15;
  22.                 map.setCenter(position, zoom);
  23.             }
  24.         </script>
  25.     </head>
  26.    
  27.     <body onload="init();">
  28.         <div style="width:100%; height:100%" id="mapElementId"></div>
  29.     </body>
  30.  
  31. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement