Hi to everyone...<br><br>I have a seriouse problem with my WFS layer.<br>I m going to explian before the context of my project.<br>I have developed a web application that has a map built using OpenLayer.<br>This map is created overlapping three different layers:
<br>- Google<br>- WMS<br>- WFS<br>Here the code.<br><br>-------------------<br><font size="2"><span style="font-family: courier new,monospace;">var satellite = new OpenLayers.Layer.Google( \"Google Satellite\" , {type: G_SATELLITE_MAP, 'minZoomLevel': myminZoomLevel, 'maxZoomLevel': mymaxZoomLevel, layers: 'basic'});
</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">var openspace_wms = new OpenLayers.Layer.WMS( \"Openspace\", \"".MAPSERVER_URL."\",
</span><span style="font-family: courier new,monospace;">{map: '".MAPFILE_PATH."', transparent:'true', layers: 'openspace', 'format':'png'});</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">var explore_wfs = new OpenLayers.Layer.WFS( \"Soundscapes\", \"".MAPSERVER_URL."\", </span><span style="font-family: courier new,monospace;">
{map: '".MAPFILE_PATH."', typename: \"explorePoints\"}, { featureClass: OpenLayers.Feature.WFS});</span><br style="font-family: courier new,monospace;"></font>-------------------<br style="font-family: courier new,monospace;">
<br>The WFS layer is composed by round icons (dots): I get the coordinates of my dots from my database throught a mapserver request. Mapserver returns the dots in a gml code and I use the function <span style="font-family: courier new,monospace;">
processXMLNode</span> in order to build the markers representing my dots.<br>Some days ago, everything was working... now, apparently without reasons, the WFS layer is not overlapped on my map. I can see the data returned from MapServer (the data are not null) but I cannot see the markers on the map.
<br>
I really don't know what could be happened... Someone knows if it is possible that some gml reference is changed?<br>I don't know very well the subject (gml version, etc) so I don't know if the problem could be linked to something like that.
<br><br>Here the function that processes my data: is it right to use the web site <a href="http://www.opengis.net/gml">http://www.opengis.net/gml</a> and <a href="http://ogc.dmsolutions.ca/gml/2.1.2/feature.xsd">http://ogc.dmsolutions.ca/gml/2.1.2/feature.xsd
</a> as I do?<br>I repeat, I have not changed anything in my code and the only thing that I can think it is that some external source is changed.....<br><span style="font-family: courier new,monospace;"><br></span><span style="font-family: courier new,monospace;">
processXMLNode: function(xmlNode) {</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"></span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
var point = OpenLayers.Ajax.getElementsByTagNameNS(xmlNode, "<a href="http://www.opengis.net/gml">http://www.opengis.net/gml</a>", "gml", "Point");</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> </span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"></span><span style="font-family: courier new,monospace;">var mysql =
OpenLayers.Ajax.getElementsByTagNameNS(xmlNode, "<a href="http://ogc.dmsolutions.ca/gml/2.1.2/feature.xsd">http://ogc.dmsolutions.ca/gml/2.1.2/feature.xsd</a>", "MYSQL", "points");</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> </span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"></span><span style="font-family: courier new,monospace;"> var text_gml =
OpenLayers.Util.getXmlNodeValue(OpenLayers.Ajax.getElementsByTagNameNS(point[0], "<a href="http://www.opengis.net/gml">http://www.opengis.net/gml</a>","gml", "coordinates")[0]);</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"><br>var floats = text_gml.split(",");</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
var id_point_mysql = OpenLayers.Util.getXmlNodeValue(OpenLayers.Ajax.getElementsByTagNameNS(mysql[0], "<a href="http://ogc.dmsolutions.ca/gml/2.1.2/feature.xsd">http://ogc.dmsolutions.ca/gml/2.1.2/feature.xsd</a>","MYSQL", "fid")[0]);
</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"><br></span><span style="font-family: courier new,monospace;">var id_color_mysql = OpenLayers.Util.getXmlNodeValue(OpenLayers.Ajax.getElementsByTagNameNS
(mysql[0], "<a href="http://ogc.dmsolutions.ca/gml/2.1.2/feature.xsd">http://ogc.dmsolutions.ca/gml/2.1.2/feature.xsd</a>","MYSQL", "des_color_id")[0]);</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"></span><span style="font-family: courier new,monospace;"> data = {lonlat: new OpenLayers.LonLat(parseFloat(floats[0]),</span>
<span style="font-family: courier new,monospace;"> parseFloat(floats[1])),</span><span style="font-family: courier new,monospace;"> id: parseInt(id_point_mysql), </span><span style="font-family: courier new,monospace;">color_id: parseInt(id_color_mysql)
</span><span style="font-family: courier new,monospace;">};</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> </span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> return data;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">},<br><br></span>Any idea?<br>
Thanks very much for every kind of help!<br>
It is very important!<br>
F. P.<br>
<br>