AnsweredAssumed Answered

How to use WMSmap with proxy?

Question asked by kniifv on Mar 7, 2017
Latest reply on Mar 7, 2017 by kniifv

So we have an wmsmap that we want to showcase using the arcgis javascript 3.20 api. To do this we have to use a proxy.

How are we supposed to do this in the best way?

Currently the code looks as below.


) {
parser.parse();

esriConfig.defaults.io.proxyUrl = "https://example.proxy.com/pubs/lmproxy/proxy.ashx";
map = new Map("map", {
//basemap: "topo",
"extent":new Extent({xmin:183742,ymin:6721409,xmax:191080,ymax:6729043,spatialReference:{wkid:3010}})

});

var layer1= new WMSLayerInfo({
name: "example",
title: "exampletitle"
});

 


//ny basemap här
var wmsLayer = new WMSLayer("http://maps.example.com/topowebb/wms/v1", {
format: "jpeg",
layers: "example",
//request: "GetMap",
//epsg: "4326",
//version: "1.3.0",
//visibleLayers: ["1"]
});
map.addLayer(wmsLayer);
var scalebar = new Scalebar({
map: map,

Outcomes