[OpenLayers-Users] Question about GML/WFS compatibility and Styling
Aaron_Gundel at sjwater.com
Aaron_Gundel at sjwater.com
Wed Aug 12 18:57:23 EDT 2009
Hello,
I am fairly new to the vector layers within openlayers and I had a
question about their usage. I'm trying to use the gml layer to display
data from a wfs. (If you're wondering why I'm not using the wfs layer,
it's because I couldn't find a method to change the wfs url and reload the
layer in the wfs layer -- whereas such a method exists within the gml
layer, seturl). It's not working. I'm using geoserver for the wfs and
getting a single feature which I want to display in the gml layer. I
don't know if this is just some inherent incompatibility or if I'm not
styling the gml layer properly (I've been experimenting with points that
are being retrieved through the wfs.)
var style = new OpenLayers.Style();
var rule = new OpenLayers.Rule(
{
symbolizer: {pointRadius: 10, fillColor: "green", fillOpacity: 0.5,
strokeColor: "black"}
});
style.addRules([rule]);
var gmlLayer = new OpenLayers.Layer.GML("GML","http://mywfscall/wfs",
{styleMap:new OpenLayers.StyleMap(style)});
return gmlLayer;
Anyway, I've confirmed that my wfs call is definitely returning gml -- I
just can't get it to display. Can anyone help me out here?
Aaron
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090812/8b694413/attachment.html
More information about the Users
mailing list