<br><font size=2 face="sans-serif">Sorry Christopher, I replied to you
but I don't think I cc'd the list. Anyway...</font>
<br>
<br><font size=2 face="sans-serif">Yes, my html is hosted at a different
origin. Yes, I am using a proxy. Yes, firebug is showing the
file loading up. The URL does contain the requested data and the
features are contained within the GML. Unfortunately no, there's
no url to this right now as it's an intranet site. </font>
<br>
<br><font size=2 face="sans-serif">Poking around at this further, it looks
to be some kind of namespace issue with what's coming out of geoserver
not being read by openlayers. I know that the basic geometry is valid
now, I swapped out some of the elements [for some I knew that worked, as
per the gml example] and changed some namespace attributes and got it to
work. But I can't serve this up from geoserver, hence the problem.
Any idea how to work around this?</font>
<br>
<br><font size=2 face="sans-serif">Aaron</font>
<br>
<br>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>Christopher Schmidt <crschmidt@metacarta.com></b>
</font>
<p><font size=1 face="sans-serif">08/12/2009 06:46 PM</font>
<td width=59%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td><font size=1 face="sans-serif">Aaron_Gundel@sjwater.com</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td><font size=1 face="sans-serif">users@openlayers.org</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td><font size=1 face="sans-serif">Re: [OpenLayers-Users] Question about
GML/WFS compatibility and Styling</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><tt><font size=2>On Wed, Aug 12, 2009 at 03:57:23PM -0700, Aaron_Gundel@sjwater.com
wrote:<br>
> Hello,<br>
> <br>
> I am fairly new to the vector layers within openlayers and I had a
<br>
> question about their usage. I'm trying to use the gml layer
to display <br>
> data from a wfs. (If you're wondering why I'm not using the
wfs layer, <br>
> it's because I couldn't find a method to change the wfs url and reload
the <br>
> layer in the wfs layer -- whereas such a method exists within the
gml <br>
> layer, seturl). It's not working. I'm using geoserver
for the wfs and <br>
> getting a single feature which I want to display in the gml layer.
I <br>
> don't know if this is just some inherent incompatibility or if I'm
not <br>
> styling the gml layer properly (I've been experimenting with points
that <br>
> are being retrieved through the wfs.) <br>
> <br>
> var style = new OpenLayers.Style();<br>
> var rule = new OpenLayers.Rule(<br>
> {<br>
> symbolizer: {pointRadius: 10, fillColor:
"green", fillOpacity: 0.5, <br>
> strokeColor: "black"}<br>
> });<br>
> style.addRules([rule]);<br>
> var gmlLayer = new OpenLayers.Layer.GML("GML","http://mywfscall/wfs",<br>
> {styleMap:new OpenLayers.StyleMap(style)});<br>
> return gmlLayer;<br>
> <br>
> Anyway, I've confirmed that my wfs call is definitely returning gml
-- I <br>
> just can't get it to display. Can anyone help me out here?<br>
<br>
is your HTML page hosted at http://mywfscall/htmlpage.html? That is, does
it<br>
share the same origin -- protocol (http), domain (mywfscall), port (80)?</font></tt>
<br>
<br><tt><font size=2>Does Firebug show the remote file getting loaded via
XMLHttpRequest?<br>
Does the URL that is requestd contain data?<br>
Does the layer.features property have anything in it? <br>
Can you provide a link?<br>
<br>
If not, then you are violating the same origin policy, and need to set
up<br>
a proxy: <br>
<br>
http://faq.openlayers.org/proxyhost/all/<br>
<br>
<br>
Regards,<br>
-- <br>
Christopher Schmidt<br>
MetaCarta<br>
</font></tt>
<br>