[OpenLayers-Dev] what is a control?

Christopher Schmidt crschmidt at metacarta.com
Sun Jun 10 16:26:19 EDT 2007


On Sun, Jun 10, 2007 at 09:21:16PM +0200, Eric Lemoine wrote:
> Hello
> 
> I have a design question: what exactly is a control in openlayers?
> What's the concept behind it? How would you define a control?
> 
> Personally I'd define a control as anything that changes the map
> behavior. I know this is quite a broad definition, but I feel the
> current set of controls covers lots of different things. Do you share
> my view of controls?

I believe that's how we designated it, though I think we actually went
with 'interacts with the map', since controls also (for example) display
the mouse position or the scale. 

So yes, things which interact with the map are controls.

Handlers, on the other hand, interact only with events for the most
part, and pass events up to controls to interact with the map.

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Dev mailing list