<div>Hi Eric,<br></div><div></div><div>I'm still new to Jscript, can you clarify this a little? or point me in the right direction?</div><div>best,</div><div>Nick</div><br><div class="gmail_quote">On Tue, Aug 4, 2009 at 7:47 AM, Eric Lemoine <span dir="ltr"><<a href="mailto:eric.lemoine@camptocamp.com">eric.lemoine@camptocamp.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">On Monday, August 3, 2009, Nicholas Efremov-Kendall<br>
<div><div class="h5"><<a href="mailto:n.e.kendall@gmail.com">n.e.kendall@gmail.com</a>> wrote:<br>
> Hi all,I've been trying to implement my gml as a layer.vector, as opposed to a layer.gml. I'm loading both into the browser with the different methods, and I can from firebug that the file is getting loaded, but it's not being displayed. Thus, if I re-sent my auto-center to sites2.events, it doesn't center at all. I'm not sure what going wrong here, I thought I'd followed the examples pretty closely. Thanks (again) in advance.<br>
> //loads fine var sites = new OpenLayers.Layer.GML (<br>
> "Archaeological Sites", "data/siteswatr.gml",<br>
> {<br>
> style: {pointRadius: 2.5},<br>
> projection: new OpenLayers.Projection("EPSG:4326"),<br>
> format: OpenLayers.Format.GML,<br>
> }<br>
> );<br>
> map.addLayer(sites);<br>
> // loads into browser but not displayed.<br>
> var sites2 = new OpenLayers.Layer.Vector (<br>
> "sites2", {projection: map.displayProjection, strategies: [new OpenLayers.Strategy.Fixed()], protocol: new OpenLayers.Protocol.HTTP({url: "data/siteswatr.gml", format: [new OpenLayers.Format.GML()]})});<br>
> map.addLayer(sites2);<br>
<br>
</div></div>Your code looks correct to me. The Fixed strategy empties the layer<br>
before adding features into it, which could explain why you see one<br>
set of features only. I'd recommend adding a break point in the fixed<br>
strategy's merge() method to understand what's going on.<br>
<br>
><br>
><br>
><br>
<br>
--<br>
Eric Lemoine<br>
<br>
Camptocamp France SAS<br>
Savoie Technolac, BP 352<br>
73377 Le Bourget du Lac, Cedex<br>
<br>
Tel : 00 33 4 79 44 44 96<br>
Mail : <a href="mailto:eric.lemoine@camptocamp.com">eric.lemoine@camptocamp.com</a><br>
<a href="http://www.camptocamp.com" target="_blank">http://www.camptocamp.com</a><br>
</blockquote></div><br>