[OpenLayers-Users] Problem with gml layer.
David Martinez Morata
damarmo at gmail.com
Wed Jun 25 10:34:38 EDT 2008
I define the projection like and option and I have the same problem.
Thanks
2008/6/25 Eric Lemoine <eric.c2c at gmail.com>:
> On Wed, Jun 25, 2008 at 3:29 PM, David Martinez Morata
> <damarmo at gmail.com> wrote:
> > Thanks for your answeres! :)
> > but now in the same point with gml features changing coordinates in the
> map.
> >
> > In options for the mep object I define this projections:
> >
> > var options = {numZoomLevels: 20,
> > projection: new OpenLayers.Projection("EPSG:900913"),
> > displayProjection: new
> OpenLayers.Projection("EPSG:4623")};
> >
> > and for my GML layer i try with:
> >
> > map.addLayer(new OpenLayers.Layer.GML("GML",
> > "
> http://10.192.160.133/OpenLayers/ngo9_wgs84_01meu_cables_lille32.gml",
> > {format: OpenLayers.Format.GML,
> > formatOptions: {
> > extractStyles: true,
> > extractAttributes: true}
> > }
> > )
> > );
> >
> > And defining the external and internal projection and alwais the same
> > problem...my layer in the middle of Atlantic ocean, when I zoom to a
> > village, the error its minimal, but if I pam to the map the layer chages
> > location!!!
> > Any sugestion to fix it?
>
> Christopher told you to pass a "projection" option to your GML layer
> constructor:
>
> map.addLayer(new OpenLayers.Layer.GML("GML",
> "http://10.192.160.133/OpenLayers/ngo9_wgs84_01meu_cables_lille32.gml",
> {format: OpenLayers.Format.GML,
> formatOptions: {
> extractStyles: true,
> extractAttributes: true}
> },
> projection: new OpenLayers.Projection('EPSG:4326')
> )
> );
>
> Have you tried that?
>
> --
> Eric
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080625/4370f0cd/attachment.html
More information about the Users
mailing list