[OpenLayers-Users] OpenLayers.IMAGE_RELOAD_ATTEMPTS,
and other global settings
Jeff Dege
jeff.dege at korterra.com
Mon May 23 10:41:30 EDT 2011
I've built a mechanism that allows me to store much of a map's configuration in a server-side database. The server code reads the settings and builds a javascript object that it passes to a function on the browser that extracts the pieces it needs and constructs a map. This allows us to configure a site for different customers without having to modify the javascript.
The configuration object contains a map options object, an array of layer objects, and an array of control objects. Each layer object and control object contains a layer options object or a control options object.
It's been working fine, within its limits, but I just ran into something unexpected. We find for a customer we want to set OpenLayers.IMAGE_RELOAD_ATTEMPTS. And this isn't an option on the map, or on any layer or control. It's a global setting, independent of any map that might be constructed.
It doesn't look like it will be hard to retrofit into my scheme. I'll simply have the javascript that handles the map settings object check to see if a setting is IMAGE_RELOAD_ATTEMPTS, and if it is, change the global setting.
But my question is this: what other global settings of this sort are there?
What map settings are available is documented in the map class's source. Ditto for layers and controls. But OpenLayers.IMAGE_RELOAD_ATTEMPTS is just a variable in OpenLayers\Util.js. There's another setting, next to it: OpenLayers.Util.onImageLoadErrorColor. But these aren't part of a list of the global settings, they're simply declarations near where they are used.
Are there other global settings of this sort, in the code? Are these documented anywhere? Is there any way of finding them, other than reading the entire codebase?
Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20110523/80ae3310/attachment.html
More information about the Users
mailing list