Last change
on this file since 5183 was 5183, checked in by mervart, 12 years ago |
|
-
Property svn:executable
set to
*
|
File size:
933 bytes
|
Rev | Line | |
---|
[5183] | 1 | <!DOCTYPE HTML>
|
---|
| 2 | <html>
|
---|
| 3 | <head>
|
---|
| 4 | <title>OpenLayers Demo</title>
|
---|
| 5 | <style type="text/css">
|
---|
| 6 | html, body, #basicMap {
|
---|
| 7 | width: 100%;
|
---|
| 8 | height: 100%;
|
---|
| 9 | margin: 0;
|
---|
| 10 | }
|
---|
| 11 | </style>
|
---|
| 12 | <script src="OpenLayers.js"></script>
|
---|
| 13 | <script>
|
---|
| 14 | function init() {
|
---|
| 15 | map = new OpenLayers.Map("basicMap");
|
---|
| 16 | 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
|
---|
| 20 | var zoom = 15;
|
---|
| 21 |
|
---|
| 22 | map.addLayer(mapnik);
|
---|
| 23 | map.setCenter(position, zoom );
|
---|
| 24 | }
|
---|
| 25 | </script>
|
---|
| 26 | </head>
|
---|
| 27 | <body onload="init();">
|
---|
| 28 | <div id="basicMap"></div>
|
---|
| 29 | </body>
|
---|
| 30 | </html>
|
---|
Note:
See
TracBrowser
for help on using the repository browser.