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

Arnd Wippermann arnd.wippermann at web.de
Wed Aug 4 05:11:29 EDT 2010


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/OpenLa
yers/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/f9fcd52e/attachment.html


More information about the Users mailing list