[OpenLayers-Dev] Map event confusion

Christopher Schmidt crschmidt at metacarta.com
Thu Mar 25 19:11:56 EDT 2010


On Thu, Mar 25, 2010 at 03:32:36PM -0600, Tim Schaub wrote:
> Marc Jansen wrote:
> > Hi devs,
> > 
> > I am rather confused about the documentation about map-events. Is it 
> > right that
> > 
> >     * addmarker,
> >     * removemarker,
> >     * clearmarkers,
> >     * dragstart,
> >     * dragend,
> >     * drag
> > 
> > are defined but never get triggered?
> > 
> > If so, they should IMHO be removed from the EVENT_TYPES-array and the 
> > documentation for that.
> > 
> 
> The problem with removing things from the EVENT_TYPES array is that 
> there could be applications that have subscribers for them and use 
> map.events to publish.
> 
> If we remove those entries, those applications break.
> 
> I know this is silly.  You are right to point out that there is little 
> sense and lots of confusion in having them.
> 
> Our safest bet is to mark them as unused and remove them in 3.0.  If 
> others think the caution is not needed, I wouldn't be opposed to 
> removing them.

In general, I'm supportive of any changes that make things simpler which
means that applications that did not throw errorrs in earlier releases will
continue to not throw errors in future releases. 

In this particular case, it's hard to imagine that someone has written
code that specifically registers for an event that doesn't do anything.

With sufficient documentation, I'd be willing to change the code to not
have those events. However,  since events (unlike methods) are not actually
in existence in the Natural Docs except if they're documented, I think
it would be equally successful -- for anyone who isn't actually digging
into the code itself, a fact that describes more and more of our users --
to just not document those events. At that point, the events simply
'disappear' from the docs completely without any other work on our
part.

-- Chris

> Tim
> 
> > Please ignore the mail if I missed something fundamental (but please 
> > enlighten me where these events are triggered)
> > 
> > Regards,
> > Marc
> > 
> > _______________________________________________
> > Dev mailing list
> > Dev at openlayers.org
> > http://openlayers.org/mailman/listinfo/dev
> 
> 
> -- 
> Tim Schaub
> OpenGeo - http://opengeo.org
> Expert service straight from the developers.
> _______________________________________________
> Dev mailing list
> Dev at openlayers.org
> http://openlayers.org/mailman/listinfo/dev

-- 
Christopher Schmidt
MetaCarta



More information about the Dev mailing list