Add 'pinned' choice for showlayercontrol: setting - show expanded layer control
This commit is contained in:
parent
dc7efc2642
commit
514e96605b
2 changed files with 6 additions and 4 deletions
|
|
@ -109,8 +109,8 @@ DynMap.prototype = {
|
|||
if(urlzoom != null)
|
||||
me.options.defaultzoom = urlzoom;
|
||||
|
||||
var showlayerctl = me.getBoolParameterByName('showlayercontrol');
|
||||
if(showlayerctl != null)
|
||||
var showlayerctl = me.getParameterByName('showlayercontrol');
|
||||
if(showlayerctl != "")
|
||||
me.options.showlayercontrol = showlayerctl;
|
||||
|
||||
if(typeof me.options.defaultzoom == 'undefined')
|
||||
|
|
@ -786,8 +786,10 @@ DynMap.prototype = {
|
|||
addToLayerSelector: function(layer, name, priority) {
|
||||
var me = this;
|
||||
|
||||
if(me.options.showlayercontrol && (!me.layercontrol)) {
|
||||
if(me.options.showlayercontrol != "false" && (!me.layercontrol)) {
|
||||
me.layercontrol = new DynmapLayerControl();
|
||||
if(me.options.showlayercontrol == "pinned")
|
||||
me.layercontrol.options.collapsed = false;
|
||||
map.addControl(me.layercontrol);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue