Changeset 5194 in ntrip for trunk/BNC/src/map/OpenStreetMaps/index.html
- Timestamp:
- Jun 9, 2013, 4:36:55 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/map/OpenStreetMaps/index.html
r5193 r5194 1 1 <!DOCTYPE HTML> 2 2 <html> 3 3 4 <head> 4 <title> OpenLayers Demo</title>5 <title>BNC OpenStreetMap View</title> 5 6 <style type="text/css"> 6 7 html, body, #basicMap { … … 10 11 } 11 12 </style> 13 12 14 <script src="http://openlayers.org/api/OpenLayers.js" ></script> 15 13 16 <script> 14 function init() { 15 map = new OpenLayers.Map("basicMap"); 17 function initialize(lat, lon) { 18 map = new OpenLayers.Map("basicMap"); 19 16 20 var mapnik = new OpenLayers.Layer.OSM(); 17 var fromProjection = new OpenLayers.Projection("EPSG:4326"); // Transform fromWGS 198418 var toProjection = new OpenLayers.Projection("EPSG:900913"); // to Spherical Mercator Projection19 var position = new OpenLayers.LonLat( 8.663283,50.090956).transform( fromProjection, toProjection); // BKG21 var fromProjection = new OpenLayers.Projection("EPSG:4326"); // WGS 1984 22 var toProjection = new OpenLayers.Projection("EPSG:900913"); // Spherical Mercator 23 var position = new OpenLayers.LonLat(lon, lat).transform(fromProjection, toProjection); 20 24 var zoom = 15; 21 25 … … 24 28 } 25 29 </script> 30 26 31 </head> 27 <body onload="init();"> 32 33 <body onload="initialize(50.090956, 8.663283);"> 28 34 <div id="basicMap"></div> 29 35 </body> 36 30 37 </html>
Note:
See TracChangeset
for help on using the changeset viewer.