[OpenLayers-Users] Default appearance of map controls

Jeff Dege jeff.dege at korterra.com
Fri Aug 6 16:43:52 EDT 2010


When you put a control on a map, OpenLayers builds a rather cryptic classid for it based on the class name.  You can supply your own replacement for part of it, but OpenLayers appends ItemActive or ItemInactive to the class, depending upon the state of the control.

This class is used to select a css rule that defines the image to be displayed on the control.

If the image doesn't exist, or the rule isn't specified, or the css file wasn't included, or the constructed class name doesn't match exactly, the control is invisible.

This just isn't right.  I just helped another programmer in our shop fix this, after he'd spent quite a few hours tracking down what turned out to be a css file inclusion problem.  He'd assumed that since he couldn't see his controls, he had a problem in his OpenLayers configuration objects.

How hard would it be to set some defaults for the control appearance that will work, even if the image file or the css file isn't present?  I'm not thinking something fancy, just a solid color would do.  Just something to indicate that the control actually has been loaded, when the control has been loaded.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100806/2c62f137/attachment.html


More information about the Users mailing list