[OpenLayers-Users] Current Map Bounds & Width, Height

Kalyan Kamepalli kalyan.kamepalli at gmail.com
Wed Aug 4 06:12:02 EDT 2010


Yes. This is what I was looking at.

Thanks for that Arnd and Franz.

Cheers,

On Wed, Aug 4, 2010 at 7:11 PM, Arnd Wippermann <arnd.wippermann at web.de>wrote:

>  Hi,
> you mean this?
>
> var winWidth   = map.getSize().w;
> var winHeight  = map.getSize().h;
>
> http://dev.openlayers.org/releases/OpenLayers-2.9.1/doc/apidocs/files/OpenLayers/Map-js.html
>
>
> Arnd
>
>  ------------------------------
> *Von:* users-bounces at openlayers.org [mailto:users-bounces at openlayers.org]
> *Im Auftrag von *Kalyan Kamepalli
> *Gesendet:* Mittwoch, 4. August 2010 08:39
> *An:* users at openlayers.org
> *Betreff:* Re: [OpenLayers-Users] Current Map Bounds & Width, Height
>
>  Sorry.
>
> used getExtent on wrong instance. I used it on Layer not on map. Now used
> on map instance and It worked.
> But, I could not find any functions to get the width and height values of
> current map.
>
> Any suggestions and help are much appreciated.
>
> Thanks,
> Kalyan.
>
> On Wed, Aug 4, 2010 at 4:28 PM, Kalyan Kamepalli <
> kalyan.kamepalli at gmail.com> wrote:
>
>> Hi,
>>
>> How to get the current map bounds given that I have map object handle. The
>> map API says getExtent returns the current view port bounds in lat lon. But,
>> When I used this function , I get undefined. Is there any other options to
>> get current map bounds and height , width values ??
>>
>>
>>
>>
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100804/a597adbe/attachment.html


More information about the Users mailing list