[OpenLayers-Dev] OpenLayers 'Debug Mode'

Schuyler Erle sderle at metacarta.com
Mon Feb 19 17:37:50 EST 2007


+1 for an OpenLayers.Log or .Debug module.

SDE

On Sun, 2007-02-18 at 11:48 -0500, Christopher Schmidt wrote:
> A bunch of times, we've run into problems where the answer has been "It
> would be really nice to let the user know that they are doing something
> which is probably wrong, but we don't have a way to inform them." In the
> past, OpenLayers had fancy debugging tools, the need for which has
> largely been removed by Firebug. However, we oftentimes run into cases
> where a user is doing something that they don't really want to do, but
> they don't know it. 
> 
> For example, #248, "Map allows layers to be added twice", is a case
> where a user was adding the same layer to the map twice. The patch I've
> added prevents this from happening -- but there is no way to say to the
> user 'you probably didn't mean to do that'.
> 
> Clearly, we don't want to be littering OpenLayers with 'alert'
> statements, but at the same time, it might be nice to have a way to put
> OpenLayers into a 'debug' mode, where these things can be reported to
> the user, either via 'alert()' calls or via console.log() or something
> similar. (I don't want to pull in a full logging framework if we can
> avoid it.)
> 
> This mode should not be the default, but an option on the map could
> allow a user to turn it on. The map object could support a 'log()'
> method, which could then report things to the user.
> 
> I can't think of the other cases this has come up, but I know they
> exist. What do people think about adding this in -- possibly not for
> 2.4, but maybe for 2.5?  
> 
> Regards,




More information about the Dev mailing list