[OpenLayers-Users] Probem on OpenLayers WFS

Alextave andrea.alri90 at gmail.com
Fri Sep 13 09:08:54 PDT 2013


Hi again, I'm stuck again I managed to view the data on the map but, after
some changes, the data are no longer displayed and the feature object in the
WFS is empty again.
This is my code in this moment:

  var Parametri_WFSPunti=new Object();
  Parametri_WFSPunti.url="http://localhost:8080/services/WFSgeoDB";
  Parametri_WFSPunti.featureType="Punto";
  Parametri_WFSPunti.featureNS="http://www.deegree.org/app";
  Parametri_WFSPunti.featurePrefix="app";
  Parametri_WFSPunti.geometryName="Point";
  Parametri_WFSPunti.outputFormat="GML2";
  
  var Parametri_WFSTratti=new Object();
  Parametri_WFSTratti.url="http://localhost:8080/services/WFSgeoDB";
  Parametri_WFSTratti.featureType="Tratto";
  Parametri_WFSTratti.featureNS="http://www.deegree.org/app";
  Parametri_WFSTratti.featurePrefix="app";
  Parametri_WFSTratti.geometryName="Percorso";
  Parametri_WFSTratti.outputFormat="GML2";
  
  var WFSPunti=new OpenLayers.Protocol.WFS.v1_1_0(Parametri_WFSPunti);
  var WFSTratti=new OpenLayers.Protocol.WFS.v1_1_0(Parametri_WFSTratti);
  
  var WFSgeoDBPunti=new OpenLayers.Layer.Vector("WFSP", { 
    strategies: [new OpenLayers.Strategy.BBOX()], 
    protocol: WFSPunti
  });
  
  var WFSgeoDBTratti=new OpenLayers.Layer.Vector("WFST", { 
    strategies: [new OpenLayers.Strategy.BBOX()], 
    protocol: WFSTratti
  });

Surfing the web I found some information about this property of
OpenLayers.Layer.Vector
 eventListeners: {
    "featuresadded": Dati
 }

The argument Dati must be a function but how should be written this
function? Can this property be useful to load e fetch the data from my
featureCollection?
Otherwise what can I do?
Please help me I am in trouble

Andrea



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Probem-on-OpenLayers-WFS-tp5072697p5077735.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.


More information about the Users mailing list