Ignore:
Timestamp:
Jun 9, 2013, 4:36:55 PM (11 years ago)
Author:
mervart
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/map/OpenStreetMaps/index.html

    r5193 r5194  
    11<!DOCTYPE HTML>
    22<html>
     3
    34  <head>
    4     <title>OpenLayers Demo</title>
     5    <title>BNC OpenStreetMap View</title>
    56    <style type="text/css">
    67      html, body, #basicMap {
     
    1011      }
    1112    </style>
     13
    1214    <script src="http://openlayers.org/api/OpenLayers.js" ></script>
     15
    1316    <script>
    14       function init() {
    15         map = new OpenLayers.Map("basicMap");
     17      function initialize(lat, lon) {
     18        map                = new OpenLayers.Map("basicMap");
     19
    1620        var mapnik         = new OpenLayers.Layer.OSM();
    17         var fromProjection = new OpenLayers.Projection("EPSG:4326");   // Transform from WGS 1984
    18         var toProjection   = new OpenLayers.Projection("EPSG:900913"); // to Spherical Mercator Projection
    19         var position       = new OpenLayers.LonLat(8.663283,50.090956).transform( fromProjection, toProjection); // BKG
     21        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);
    2024        var zoom           = 15;
    2125 
     
    2428      }
    2529    </script>
     30
    2631  </head>
    27   <body onload="init();">
     32
     33  <body onload="initialize(50.090956, 8.663283);">
    2834    <div id="basicMap"></div>
    2935  </body>
     36
    3037</html>
Note: See TracChangeset for help on using the changeset viewer.