[OpenLayers-Dev] I have a question/debate regarding the use of map.viewPortDiv in controls.

Xavier Mamano (jorix) xavier.mamano at gmail.com
Tue May 18 17:36:42 EDT 2010


Hi list,

In default/style.css I have only seen a control that use a display class for
map.viewPortDiv (Control.DragFeature). Display class in map.viewPortDiv
seems a very powerful tool in the line CSS. I have used it to
display:none/block without any problem. Could you expand its use in
default/style.css?

If so, my concern is the use of a list of display classes in the property
displayClass. On OpenLayers.Control when using a list of classes is also
altered the map.viewPortDiv class, and could cause problems in the future.

It would be nice to have an additional property in Control that will only
affect the div class? And no future problems with a list of display class?

The code in OpenLayersControl would be:
draw: function(px) {
...
    this.div.className = this.displayClass;
+    If (this.displayAdditionalClass) {
+        this.div.className += " " + this.displayAdditionalClass;
+    }

Worth it? I think so

Xavier Mamano (jorix)
-- 
View this message in context: http://osgeo-org.1803224.n2.nabble.com/I-have-a-question-debate-regarding-the-use-of-map-viewPortDiv-in-controls-tp5072275p5072275.html
Sent from the OpenLayers Dev mailing list archive at Nabble.com.



More information about the Dev mailing list