[OpenLayers-Dev] [OpenLayers-Trac] [OpenLayers] #966: Add attribution control to map by default

Christopher Schmidt crschmidt at metacarta.com
Wed Sep 12 10:07:58 EDT 2007


On Wed, Sep 12, 2007 at 10:01:48AM -0400, Paul Spencer wrote:
> Chris,
> 
> by default, do you mean that if you construct a new map with an empty  
> controls option, the attribution would be created anyway, or would  
> not be created?

Not created. That's a 'deliberate action' in my mind -- If you're
overriding the controls, you're doing it with that goal in mind, and you
would then need to add the control back.

If a commercial data provider really wants to ensure that their data is
only used with an attribution control on the map, they can loop through
the controls list when setmap is called and throw an error in some way
if the attribution control is not present (by checking CLASS_NAME).

As with anything, it isn't foolproof -- just handy.

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Dev mailing list