Skip to content

Instantly share code, notes, and snippets.

@ndkv
Last active December 15, 2015 15:29
Show Gist options
  • Save ndkv/5281769 to your computer and use it in GitHub Desktop.
Save ndkv/5281769 to your computer and use it in GitHub Desktop.
AHN alternative coloring
<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://ec2-184-73-66-219.compute-1.amazonaws.com:8080/geoserver/wms?",
{ layers: "heights", format: "image/png", 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