Adding WCS and WFS layers using arc GIS java script API?

501
1
11-28-2013 10:07 PM
Pankajroy
New Contributor
Hi All,

Is it possible to add WMS, WCS and WFS layers using ArcGIS java script API.

For WCS and WFS layers I did not find any sample. Possible to add them using Open layers?

Tried to add WFS as a feature layer and WCS as image layer but to no use.

WMS layers can be added using WMSLAYER but in my case I don't see the layer added to the map, it is not throwing any error but at the same time not adding the layer as well...



Thanx In Advance,
Pankaj Roy
0 Kudos
1 Reply
Pankajroy
New Contributor
After adding WMS layer when i check the URL response in fiddler i get the following error

<?xml version="1.0" encoding="UTF-8" standalone="true"?>
-<ServiceExceptionReport version="1.3.0" xsi:schemaLocation="http://www.opengis.net/ogc http://schemas.opengis.net/wms/1.3.0/exceptions_1_3_0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.opengis.net/ogc"><ServiceException code="InvalidSRS(CRS)"> Parameter 'srs(crs)'
can not be empty. </ServiceException></ServiceExceptionReport>


Following is the code i have written

function handleWMSLayer() {
    var layer1 = new esri.layers.WMSLayerInfo({ name: "1", title: "DC_SECTOR" });
    var resourceInfo = {
        extent: map.extent,
        layerInfos: [layer1]
       };
  
   var wmsLayer = new esri.layers.WMSLayer("http://localhost:6080/arcgis/services/SIGMA/SIGMA_WMS/MapServer/WMSServer",
        {
            resourceInfo: resourceInfo,
            visibleLayers:['1']
           
        });
    wmsLayer.setImageFormat("png");
    map.addLayer(wmsLayer);

}


Thanx,
Pankaj Roy
0 Kudos