[OpenLayers-Users] Resize extent based on WMS Filtered Layer
Bradley McLain
bradley_mclain at debortoliwines.com
Wed Feb 4 16:52:13 EST 2009
Is there anyway to perhaps work around this.
Perhaps getting the extent and converting it to the nearest zoom
level/extent that Google recognizes?
Brad
2009/2/4 Mika Lehtonen <mika at digikartta.net>
> Hi Bradley,
>
> according to my knowledge, Google Maps have fixed zoom levels, so you can't
> get precise zooming when referring to your wms polygon layer. This is just
> something you have to live with.
>
> - mika -
>
> Bradley McLain kirjoitti:
>
>> Hi all,
>>
>> What i am looking to do is have my map automatically re-size itself based
>> off a WMS layer which is being overlayed on top of a Google Map layer.
>>
>> The WMS layer is generated using the filter option to only get specific
>> polygons.
>>
>> What i would like to do is have the map re-size to zoom itself to just fit
>> in the currently displayed polygons, sometimes only 1 and sometimes many.
>>
>> After redrawing the map
>> wms.redraw(true);
>> I have tried both of the following to re-size the map correctly,
>> however no luck, both are zoomed out too far. var newBounds =
>> wms.getExtent();
>> map.zoomToExtent(newBounds);
>>
>> var newZoom = wms.getZoomForExtent(wms.getExtent(), true)
>> map.zoomTo(newZoom);
>>
>> Brad
>>
>> --
>> Bradley Mclain
>> Systems Administrator Trainee
>> De Bortoli Wines Pty limited
>> De Bortoli Rd, BILBUL NSW 2680
>> e: bradley_mclain at debortoliwines.com <mailto:
>> bradley_mclain at debortoliwines.com>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Users mailing list
>> Users at openlayers.org
>> http://openlayers.org/mailman/listinfo/users
>>
>>
>
--
Bradley Mclain
Systems Administrator Trainee
De Bortoli Wines Pty limited
De Bortoli Rd, BILBUL NSW 2680
e: bradley_mclain at debortoliwines.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090205/0264e7c9/attachment.html
More information about the Users
mailing list