[OpenLayers-Users] different coords format

Pierre GIRAUD bluecarto at gmail.com
Mon Dec 10 08:12:35 EST 2007


You should have something better using :

var coords = window[id].map.getLonLatFromPixel(e.xy.x, e.xy.y);

Then you can access coords.x and corrds.y.

Regards

On Dec 10, 2007 2:05 PM, Ortner Reinhard
<Reinhard.Ortner at edu.fh-kaernten.ac.at> wrote:
> thx, but back to my question :)
>
> can i use it like:
>
> coords: getLonLatFromPixel(e.xy.x, e.xy.y)
>
> because it doesn´t work like that
>
> ________________________________
>
> Von: users-bounces at openlayers.org im Auftrag von Bart van den Eijnden (OSGIS)
> Gesendet: Mo 10.12.2007 13:59
> An: Christopher Schmidt
> Cc: users at openlayers.org
> Betreff: Re: [OpenLayers-Users] different coords format
>
>
>
> Hi Chris,
>
> thanks for the clarification, so why is it labeled as an API Method if it is
> meant to be internal?
>
> Best regards,
> Bart
>
> --
> Bart van den Eijnden
> OSGIS, Open Source GIS
> http://www.osgis.nl <http://www.osgis.nl/>
>
>
>
> --------- Oorspronkelijk bericht --------
> Van: Christopher Schmidt <crschmidt at metacarta.com>
> Naar: Bart van den Eijnden OSGIS <bartvde at osgis.nl>
> Cc: R. Ortner <reinhard.ortner at edu.fh-kaernten.ac.at>, users at openlayers.org
> Onderwerp: Re: [OpenLayers-Users] different coords format
> Datum: 10/12/07 10:56
>
> > On Mon, Dec 10, 2007 at 01:19:26PM +0100, Bart van den Eijnden (OSGIS)
> wrote:
> > &gt; You can use the function getLonLatFromViewPortPx on the map object.
> >
> > actually, getLonLatFromPixel is the right function to use here:
> > &quot;FromViewPortPx&quot; is a more internal function that we wrap up
> with
> > getLatLonFromPixel.
> >
> > Regards,
> > --
> > Christopher Schmidt
> > MetaCarta
> >
> >
>
>
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>



More information about the Users mailing list