Is there anyway to perhaps work around this.<br><br>Perhaps getting the extent and converting it to the nearest zoom level/extent that Google recognizes?<br><br>Brad<br><br><div class="gmail_quote">2009/2/4 Mika Lehtonen <span dir="ltr"><<a href="mailto:mika@digikartta.net">mika@digikartta.net</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi Bradley,<br>
<br>
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.<br>
<br>
- mika -<br>
<br>
Bradley McLain kirjoitti:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="Wj3C7c">
Hi all,<br>
<br>
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.<br>
<br>
The WMS layer is generated using the filter option to only get specific polygons.<br>
<br>
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.<br>
<br>
After redrawing the map<br>
wms.redraw(true);<br>
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();<br>
map.zoomToExtent(newBounds);<br>
<br>
var newZoom = wms.getZoomForExtent(wms.getExtent(), true)<br>
map.zoomTo(newZoom);<br>
<br>
Brad<br>
<br>
-- <br>
Bradley Mclain<br>
Systems Administrator Trainee<br>
De Bortoli Wines Pty limited<br>
De Bortoli Rd, BILBUL NSW 2680<br></div></div>
e: <a href="mailto:bradley_mclain@debortoliwines.com" target="_blank">bradley_mclain@debortoliwines.com</a> <mailto:<a href="mailto:bradley_mclain@debortoliwines.com" target="_blank">bradley_mclain@debortoliwines.com</a>><br>
------------------------------------------------------------------------<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@openlayers.org" target="_blank">Users@openlayers.org</a><br>
<a href="http://openlayers.org/mailman/listinfo/users" target="_blank">http://openlayers.org/mailman/listinfo/users</a><br>
<br>
</blockquote>
</blockquote></div><br><br clear="all"><br>-- <br>Bradley Mclain<br>Systems Administrator Trainee<br>De Bortoli Wines Pty limited<br>De Bortoli Rd, BILBUL NSW 2680<br>e: <a href="mailto:bradley_mclain@debortoliwines.com">bradley_mclain@debortoliwines.com</a><br>