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 <[email protected]> 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
> [email protected]
> http://www.geoext.org/cgi-bin/mailman/listinfo/users
>



-- 
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.
_______________________________________________
Users mailing list
[email protected]
http://www.geoext.org/cgi-bin/mailman/listinfo/users

Reply via email to