2020-02-07 23:52:14 +00:00
|
|
|
<!DOCTYPE html>
|
2019-11-20 20:09:02 +00:00
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<title>OpenLayers Simplest Example</title>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div id="Map" style="height:250px"></div>
|
|
|
|
<script src="/javascript/openlayers/OpenLayers.js"></script>
|
|
|
|
<script>
|
2021-04-16 20:52:20 +01:00
|
|
|
var lat = 47.6384400; // Altaussee
|
2021-04-16 18:50:37 +01:00
|
|
|
var lon = 13.7627800;
|
2019-11-20 20:09:02 +00:00
|
|
|
var zoom = 18;
|
|
|
|
|
|
|
|
var fromProjection = new OpenLayers.Projection("EPSG:4326"); // Transform from WGS 1984
|
|
|
|
var toProjection = new OpenLayers.Projection("EPSG:900913"); // to Spherical Mercator Projection
|
|
|
|
var position = new OpenLayers.LonLat(lon, lat).transform( fromProjection, toProjection);
|
|
|
|
|
|
|
|
map = new OpenLayers.Map("Map");
|
|
|
|
var mapnik = new OpenLayers.Layer.OSM();
|
|
|
|
map.addLayer(mapnik);
|
|
|
|
|
|
|
|
var markers = new OpenLayers.Layer.Markers( "Markers" );
|
|
|
|
map.addLayer(markers);
|
|
|
|
markers.addMarker(new OpenLayers.Marker(position));
|
|
|
|
|
|
|
|
map.setCenter(position, zoom);
|
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html>
|