<div>Hi Eric,<br></div><div></div><div>It displays, but incorrorectly (offset by some factor I haven't checked, down and to the left by a country or so). I manually reprojected the data using GDAL from a shapefile originally collected in UTM. I've checked the GML it does say it's in 4326. Regardless of the projection, why doesn't the map.getCenter function work on that file? do you think it has to do with the GML itself?</div>
<br><div class="gmail_quote">On Tue, Aug 4, 2009 at 7:37 AM, Eric Lemoine <span dir="ltr"><<a href="mailto:eric.lemoine@camptocamp.com" target="_blank">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><<a href="mailto:n.e.kendall@gmail.com" target="_blank">n.e.kendall@gmail.com</a>> wrote:<br>
> Hi all,<br>
</div>> Not sure what's going on here, and what/why I'm doing wrong.I'm loading successfully a gml layer which isn't displaying in the right placevar topo = new OpenLayers.Layer.GML ("Topography", "data/topo.gml",<br>
<div>> {<br>
> style: {strokeWidth: 1, strokeColor:"#CCCCCC"},<br>
> }<br>
> );<br>
><br>
> when I add projection and format criteria, it doesn't display at all, let alone in the wrong place, and the auto map.setCenter function doesn't work.<br>
> var topo = new OpenLayers.Layer.GML ("Topography", "data/topo.gml",<br>
> {<br>
> style: {strokeWidth: 1, strokeColor:"#CCCCCC"},<br>
> projection: new OpenLayers.Projection("EPSG:4326"),<br>
> format: OpenLayers.Format.GML,<br>
> }<br>
> );<br>
><br>
> Is there anything really obvious that I'm missing? thanks again, in advance<br>
<br>
</div>Hi<br>
<br>
What's the coordinates system of your data? The fact that it does<br>
display when you don't set "projection" to 4326 makes me think your<br>
data is not 4326.<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" target="_blank">eric.lemoine@camptocamp.com</a><br>
<a href="http://www.camptocamp.com" target="_blank">http://www.camptocamp.com</a><br>
</blockquote></div><br>