Last change
on this file since 5194 was 5194, checked in by mervart, 12 years ago |
|
-
Property svn:executable
set to
*
|
File size:
981 bytes
|
Rev | Line | |
---|
[5183] | 1 | <!DOCTYPE HTML>
|
---|
| 2 | <html>
|
---|
[5194] | 3 |
|
---|
[5183] | 4 | <head>
|
---|
[5194] | 5 | <title>BNC OpenStreetMap View</title>
|
---|
[5183] | 6 | <style type="text/css">
|
---|
| 7 | html, body, #basicMap {
|
---|
| 8 | width: 100%;
|
---|
| 9 | height: 100%;
|
---|
| 10 | margin: 0;
|
---|
| 11 | }
|
---|
| 12 | </style>
|
---|
[5194] | 13 |
|
---|
[5193] | 14 | <script src="http://openlayers.org/api/OpenLayers.js" ></script>
|
---|
[5194] | 15 |
|
---|
[5183] | 16 | <script>
|
---|
[5194] | 17 | function initialize(lat, lon) {
|
---|
| 18 | map = new OpenLayers.Map("basicMap");
|
---|
| 19 |
|
---|
[5183] | 20 | var mapnik = new OpenLayers.Layer.OSM();
|
---|
[5194] | 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);
|
---|
[5183] | 24 | var zoom = 15;
|
---|
| 25 |
|
---|
| 26 | map.addLayer(mapnik);
|
---|
| 27 | map.setCenter(position, zoom );
|
---|
| 28 | }
|
---|
| 29 | </script>
|
---|
[5194] | 30 |
|
---|
[5183] | 31 | </head>
|
---|
[5194] | 32 |
|
---|
| 33 | <body onload="initialize(50.090956, 8.663283);">
|
---|
[5183] | 34 | <div id="basicMap"></div>
|
---|
| 35 | </body>
|
---|
[5194] | 36 |
|
---|
[5183] | 37 | </html>
|
---|
Note:
See
TracBrowser
for help on using the repository browser.