[OpenLayers-Users] LayerSwitcher order
Erik Uzureau
euzuro at gmail.com
Fri Jul 14 08:32:52 CDT 2006
On 7/14/06, karpi <karpi.lists at email.cz> wrote:
> Hello.. Im experimenting with openlayers, on this site:
> http://gismaster.liberix.cz/openlayers/
> Please, there is my beginners questions:
>
> 1) Can i change seting order of layers in OpenLayers.Control.LayerSwitcher() ??
> ( I would like to have latest drawn layer on top, first drawn at the
> bottom..)
currently openlayers does not support drawing of layers in reverse order, but
if you would like to do so, it would be very easy. you just need to
reverse the loop
in the redraw function in lib/OpenLayer/Control/LayerSwitcher.js:
/**
* @returns A reference to the DIV DOMElement containing the switcher tabs
* @type DOMElement
*/
redraw: function() {
//clear out previous incarnation of LayerSwitcher tabs
this.div.innerHTML = "";
var visible = false;
for( var i = 0; i < this.map.layers.length; i++) {
if (visible && this.mode == "radio") {
this.map.layers[i].setVisibility(false);
} else {
visible = this.map.layers[i].getVisibility();
}
this.addTab(this.map.layers[i]);
}
return this.div;
},
> 2) How can i avoid "freted shape" of blue layer switchers ?
This is due to specifications in your stylesheet...
if you comment out the margin styles from "p", they are fixed.
p {text-indent: 30px;
/* border-style: dashed;
border-width: 1px; */
text-align: justify;
/* margin-left: 10%;
margin-right: 10%; */
margin-top: 30px;
margin-bottom: 60px;
text-indent: 20px;
}
> 3) I do not know.. there is probably out of openlayers control, but can
> i display "basic" layer from http://labs.metacarta.com/wms/vmap0 not
> fully opaque, but only semitransparent ?
Hmm... not sure if this is possible.... schuyler? chris?
Anyways hope #1 & 2 help you out a bit,
-erik
More information about the Users
mailing list