IAPdata

WMS service called with CRS=EPSG:102100

Discussion created by IAPdata on Dec 2, 2013
Latest reply on Apr 9, 2015 by jcantr1
Hi,

I'm trying to add a WMS layer on top of a map.
I'm trying to use CRS="EPSG:28992", so this is my code:

[HTML]    <script src="//js.arcgis.com/3.7/"></script>
    <script>
        var map;

        require([
          "esri/map",
          "esri/dijit/LocateButton",
          "esri/layers/WMSLayer",
          "esri/layers/WMSLayerInfo",
          "esri/geometry/Extent",
          "dojo/domReady!"
        ], function (
          Map, LocateButton, WMSLayer, WMSLayerInfo, Extent
        ) {
            map = new Map("map", {
                center: [5.291, 52.132],
                zoom: 8,
                basemap: "osm",
                logo: false,
                showAttribution: false
            });

            var wmsURL = "http://geodata.nationaalgeoregister.nl/aan/wms";

            var layer1 = new WMSLayerInfo({ name: "aan", title: "aan" });
            var resourceInfo = {
                extent: new Extent(4259, 304879, 285658, 614732, { wkid: 28992 }),
                layerInfos: [layer1]
            };

            var wmsLayer = new WMSLayer(wmsURL, {
                resourceInfo: resourceInfo,
                visibleLayers: ['aan']
            });

            wmsLayer.setImageTransparency(true);
            map.addLayers([wmsLayer]);

            geoLocate = new LocateButton({
                map: map
            }, "LocateButton");
            geoLocate.startup();

        });
    </script>[/HTML]

Now here is my problem, when I look in the requests, I see the following url being called:
http://geodata.nationaalgeoregister.nl/aan/wms?SERVICE=WMS&REQUEST=GetMap&FORMAT=image/png&TRANSPARENT=TRUE&STYLES=&VERSION=1.3.0&LAYERS=aan&WIDTH=1600&HEIGHT=632&CRS=EPSG:102100&BBOX=99794.44476209529,6630795.21998089,1078188.4068123032,7017260.834990723

Where I specifically asked for EPSG:28992.

What am I doing wrong here?

Thank you in advance!

Outcomes