Here's the wiki page for this new addin:<br><a href="http://trac.openlayers.org/wiki/Addins/ZoomToFeatures">http://trac.openlayers.org/wiki/Addins/ZoomToFeatures</a><br><br>Hope you like it ;-)<br><br>F.<br><br><br><div>
<span class="gmail_quote">2009/2/10, Eric Lemoine <<a href="mailto:eric.c2c@gmail.com">eric.c2c@gmail.com</a>>:</span><blockquote class="gmail_quote" style="margin-top: 0; margin-right: 0; margin-bottom: 0; margin-left: 0; margin-left: 0.80ex; border-left-color: #cccccc; border-left-width: 1px; border-left-style: solid; padding-left: 1ex">
On Mon, Feb 9, 2009 at 7:35 PM, Thomas Wood <<a href="mailto:grand.edgemaster@gmail.com">grand.edgemaster@gmail.com</a>> wrote:<br> > How about this?<br> > b = Layer.getDataBounds()<br> > map.zoomToExtent(b)<br>
<br><br>Thomas, François's control does a bit more than that. Basically it<br> activates itself when the features are added and when the map is<br> moved, and deactivates itself when features are removed and the layer<br>
gets empty. The auto activation/deactivation stuff is usefull because<br> it disables/enables this control's button.<br><br><br> ><br> > 2009/2/9 François Van Der Biest <<a href="mailto:f.vanderbiest@gmail.com">f.vanderbiest@gmail.com</a>>:<br>
>> Hi all,<br> >><br> >> I wrote a small control, which I find useful to zoom to a vector<br> >> layer's features (see attachment).<br> >> Pierre Giraud and Eric Lemoine told me there's little chance for it to<br>
>> become a standard OpenLayers control.<br> >><br> >> What would be your opinion on that ? Is there a chance it could become<br> >> an addin then ?<br> >> What would be the steps to follow in that case (write doc, unit tests, ...) ?<br>
<br><br>Yeah, I think this could make an interesting addin.<br><br> <<a href="http://trac.openlayers.org/wiki/Addins">http://trac.openlayers.org/wiki/Addins</a>><br><br> --<br><br>Eric<br></blockquote></div><br>