On Mon, Feb 9, 2009 at 7:35 PM, Thomas Wood <[email protected]> wrote: > How about this? > b = Layer.getDataBounds() > map.zoomToExtent(b)
Thomas, François's control does a bit more than that. Basically it activates itself when the features are added and when the map is moved, and deactivates itself when features are removed and the layer gets empty. The auto activation/deactivation stuff is usefull because it disables/enables this control's button. > > 2009/2/9 François Van Der Biest <[email protected]>: >> Hi all, >> >> I wrote a small control, which I find useful to zoom to a vector >> layer's features (see attachment). >> Pierre Giraud and Eric Lemoine told me there's little chance for it to >> become a standard OpenLayers control. >> >> What would be your opinion on that ? Is there a chance it could become >> an addin then ? >> What would be the steps to follow in that case (write doc, unit tests, ...) ? Yeah, I think this could make an interesting addin. <http://trac.openlayers.org/wiki/Addins> -- Eric _______________________________________________ Dev mailing list [email protected] http://openlayers.org/mailman/listinfo/dev
