[Users] Get Position from Vectorlayer
Andreas Hocevar
ahocevar at opengeo.org
Mon Nov 21 12:34:25 CET 2011
Hi,
you should be using the getLonLatFromPixel API method, although this
won't fix your issue. To fix your issue, make sure to really call it
on the map, not on the vector layer. And finally, it won't return
anything before the extent/center of the map has been set initially.
Andreas.
On Mon, Nov 21, 2011 at 11:58 AM, Kai Volland <kaivolland at web.de> wrote:
> Hi,
>
> i get the error map.getLonLatFromViewPortPx is null when using it with a
> vectorlayer. Isn't it possible to use it it with a vectorlayer? And if
> it's not possible how to get the position of an vector item?
>
> (The idea is to zoom in when clicking on clustered vectoritems.)
>
> Kind regards
>
> Kai
> _______________________________________________
> Users mailing list
> Users at geoext.org
> http://www.geoext.org/cgi-bin/mailman/listinfo/users
>
--
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.
More information about the Users
mailing list