[OpenLayers-Users] also strange vector behavior (obviously I've messed up)

Nicholas Efremov-Kendall n.e.kendall at gmail.com
Tue Aug 4 04:41:23 EDT 2009


Hi Eric,
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?

On Tue, Aug 4, 2009 at 7:37 AM, Eric Lemoine <eric.lemoine at camptocamp.com>wrote:

> On Monday, August 3, 2009, Nicholas Efremov-Kendall
> <n.e.kendall at gmail.com> wrote:
> > Hi all,
> > 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",
> >               {
> >               style: {strokeWidth: 1, strokeColor:"#CCCCCC"},
> >               }
> >               );
> >
> > 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.
> >  var topo = new OpenLayers.Layer.GML ("Topography", "data/topo.gml",
> >               {
> >               style: {strokeWidth: 1, strokeColor:"#CCCCCC"},
> >               projection: new OpenLayers.Projection("EPSG:4326"),
> >               format: OpenLayers.Format.GML,
> >               }
> >               );
> >
> > Is there anything really obvious that I'm missing? thanks again, in
> advance
>
> Hi
>
> What's the coordinates system of your data? The fact that it does
> display when you don't set "projection" to 4326 makes me think your
> data is not 4326.
>
>
> >
>
> --
> Eric Lemoine
>
> Camptocamp France SAS
> Savoie Technolac, BP 352
> 73377 Le Bourget du Lac, Cedex
>
> Tel : 00 33 4 79 44 44 96
> Mail : eric.lemoine at camptocamp.com
> http://www.camptocamp.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090804/07f8dced/attachment.html


More information about the Users mailing list