[OpenLayers-Dev] OpenLayers.Control.ZoomToFeatures
Eric Lemoine
eric.c2c at gmail.com
Tue Feb 10 01:51:40 EST 2009
On Mon, Feb 9, 2009 at 7:35 PM, Thomas Wood <grand.edgemaster at gmail.com> 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 <f.vanderbiest at gmail.com>:
>> 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
More information about the Dev
mailing list