[OpenLayers-Dev] OpenLayers.Handler has APIMethod's!
Lourens Veen
veen at science.uva.nl
Tue Nov 13 06:28:07 EST 2007
On Tuesday 13 November 2007 10:11:38 Eric Lemoine wrote:
> Hello
>
> OpenLayers.Handler includes methods annotated as APIMethod's. I'm a
> bit surprised with that. To me, handlers belong to OpenLayers
> internals and shouldn't be part of OpenLayers API. What do you think?
I just wrote a custom control called SelectBox. It'll let you select features
in one or more vector layers by either clicking (all features under the mouse
will be selected) or dragging a box (all features completely within the box
will be selected). I'm hoping this will help deal with overlapping features.
Because OpenLayers has this nice Handler/Control architecture, setting this up
was a breeze. I used the Box handler (used by the ZoomBox control) from my
own SelectBox control, and all I had to do was write the actual selection
code based on the input from the handler.
Of course, to be able to do that, handlers need to have a stable public
interface, and thus be part of the API.
Cheers,
Lourens
--
ir. Lourens Veen Universiteit van Amsterdam - IBED
Nieuwe Achtergracht 166
Wetenschappelijk Programmeur 1018 WV Amsterdam, The Netherlands
EcoGRID-GAN tel: 020-5257453 fax: 020-5257431
More information about the Dev
mailing list