<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=7,IE=9"> <!--The viewport meta tag is used to improve the presentation and behavior of the samples on iOS devices--> <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"> <title>Map with WMS</title> <link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.3/js/dojo/dijit/themes/claro/claro.css"> <link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.3/js/esri/css/esri.css"> <style> html, body { height: 100%; width: 100%; margin: 0; padding: 0; } </style> <script>var dojoConfig = {parseOnLoad: true};</script> <script src="http://serverapi.arcgisonline.com/jsapi/arcgis/3.3/"></script> <script> dojo.require("dijit.layout.BorderContainer"); dojo.require("dijit.layout.ContentPane"); dojo.require("esri.map"); dojo.require("esri.layers.wms"); var map; var wmsLayer; function init() { map = new esri.Map("map",{ extent: new esri.geometry.Extent({"xmin":-89257.57663483504,"ymin":6286122.683888868,"xmax":1196107.491008342,"ymax":6908625.842243175,"spatialReference":{"wkid":102100}}) }); esri.config.defaults.io.proxyUrl = "http://localhost/proxy/proxy.ashx"; var basemap = new esri.layers.ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"); dojo.connect(map, "onLoad", function(){ wmsLayer = new esri.layers.WMSLayer("http://grb.agiv.be/geodiensten/raadpleegdiensten/GRB/wms"); wmsLayer.setVisibleLayers([0,1]); wmsLayer.setImageFormat("png"); map.addLayer(wmsLayer); }); map.addLayer(basemap); } dojo.ready(init); </script> </head> <body class="claro"> <div id="content" data-dojo-type="dijit.layout.BorderContainer" data-dojo-props="design:'headline', gutters:false" style="width: 100%; height: 100%; margin: 0;"> <div id="map" data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'center'" style="overflow:hidden;"> </div> </div> </body> </html>
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.