mirror of
https://expo.survex.com/repositories/expoweb/.git/
synced 2024-11-24 16:21:56 +00:00
30 lines
995 B
HTML
30 lines
995 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>OpenLayers Simplest Example</title>
|
|
</head>
|
|
<body>
|
|
<div id="Map" style="height:250px"></div>
|
|
<script src="/javascript/openlayers/OpenLayers.js"></script>
|
|
<script>
|
|
var lat = 47.6384400; // Altaussee
|
|
var lon = 13.7627800;
|
|
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>
|