[OpenLayers-Dev] OpenLayers.Handler has APIMethod's!
Tim Schaub
tschaub at openplans.org
Tue Nov 13 18:49:14 EST 2007
Hey-
Eric Lemoine wrote:
> On Nov 13, 2007 12:28 PM, Lourens Veen <veen at science.uva.nl> wrote:
>> 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.
>
> The Box handler has no APIMethods. So I guess things could change from
> under your feet...
>
Since we don't use a pattern that gives us private or privileged
methods, we decided not to use terms like public/private. Strictly
speaking, all our instance methods are public.
So, the API/non-API distinction is about stability within a major
version number only. We haven't done a thorough review of the code (and
docs really) to determine what should and shouldn't be part of the API -
assignment has been somewhat haphazard really.
The idea is to give application designers something they can rely on.
As with all our docs, the APIMethod/Property labels are incomplete. So
we have a somewhat sketchy contract with application designers. They
trust us to be reasonable.
I like to think that our docs say what we want the library to do, our
tests say what it actually does, and the code is somewhere in between.
As we flesh out the docs, particularly the API* part, it will become
easier for others to understand what we want them to do with the library.
In the meantime, we just have to trust each other.
Tim
> --
> Eric
> _______________________________________________
> Dev mailing list
> Dev at openlayers.org
> http://openlayers.org/mailman/listinfo/dev
>
> !DSPAM:4033,4739aa5d78902143011171!
>
More information about the Dev
mailing list