give the radio buttons for the baselayers in the layer switcher control a name depending on the layerswitcher, this avoids problems with several maps and several layer switchers in the same page, r=bartvde (Closes #2331)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@9772 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -292,7 +292,7 @@ OpenLayers.Control.LayerSwitcher =
|
||||
// create input element
|
||||
var inputElem = document.createElement("input");
|
||||
inputElem.id = this.id + "_input_" + layer.name;
|
||||
inputElem.name = (baseLayer) ? "baseLayers" : layer.name;
|
||||
inputElem.name = (baseLayer) ? this.id + "_baseLayers" : layer.name;
|
||||
inputElem.type = (baseLayer) ? "radio" : "checkbox";
|
||||
inputElem.value = layer.name;
|
||||
inputElem.checked = checked;
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
var wmsInput = OpenLayers.Util.getElement(control.id + "_input_" + layer.name);
|
||||
t.ok(wmsInput != null, "correctly makes an input for wms layer");
|
||||
t.eq(wmsInput.type, "radio", "wms correctly made a radio button");
|
||||
t.eq(wmsInput.name, "baseLayers", "wms correctly named");
|
||||
t.eq(wmsInput.name, control.id + "_baseLayers", "wms correctly named");
|
||||
t.eq(wmsInput.value, layer.name, "wms correctly valued");
|
||||
|
||||
var markersInput = OpenLayers.Util.getElement(control.id + "_input_" + markers.name);
|
||||
|
||||
Reference in New Issue
Block a user