Last active
December 15, 2015 10:59
-
-
Save ndkv/5249739 to your computer and use it in GitHub Desktop.
/dev/haag WMS example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<title>OpenLayers WMS example</title> | |
<script type="text/javascript" src="http://waalweelde.ndkv.nl/lib/OpenLayers-2.12/OpenLayers.js"></script> | |
<script type="text/javascript"> | |
function init() { | |
var map = new OpenLayers.Map('map', { | |
maxExtent: new OpenLayers.Bounds(10000.0, 305000.0, 280000.0, 619000.0), | |
projection: new OpenLayers.Projection("EPSG:28992") | |
}); | |
var layer = new OpenLayers.Layer.WMS( | |
"Actueel Hoogtebestand Nederland 25 m", | |
"http://geodata.nationaalgeoregister.nl/ahn25m/wms", | |
{ layers: "ahn25m", format: "image/png", srs: "EPSG:28992", styles: "" }, | |
{ transitionEffect:'resize' } | |
); | |
map.addLayer(layer); | |
map.setCenter(new OpenLayers.LonLat(445463, 156271), 1); | |
} | |
</script> | |
</head> | |
<body onload="init()"> | |
<div id="map" style="height: 500px; width: 1000px;"></div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment