AnsweredAssumed Answered

ESRI WFS Layer API , when layer namespace is URN in WFS service

Question asked by NikhilV on Feb 2, 2016

Hello , I need to use ESRI WFSlayer api , my WFS service namespace is  a URN instead of URL ad the ESRI api doesnt accept URN in nsLayerName object.. any ideas or pointers ?

 

Added sample code from ESRI

require(["esri/map", "esri/InfoTemplate","esri/layers/WFSLayer", "esri/config", "dojo/domReady!"], function(Map, InfoTemplate, WFSLayer, esriConfig) {
    map
= new Map("map", {
      basemap
: "topo",
      center
: [-122.836, 42.346],
      zoom
: 13
   
});

   
var opts = {
       
"url": "http://suite.opengeo.org/geoserver/wfs",
       
"version": "1.1.0",
       
"nsLayerName": "http://medford.opengeo.org|citylimits",
       
"wkid": 3857,
       
"mode": "SNAPSHOT",
       
"maxFeatures": 100,
       
"showDetails": true,
       
"infoTemplate": new InfoTemplate()             
   
};

    esriConfig
.defaults.io.proxyUrl = "/proxy/";

   
var layer = new WFSLayer(opts);
    map
.addLayer(layer);

 
});

Outcomes