[OpenLayers-Users] Delete title in layerswitcher

sasamil sasha.milenkovic at gmail.com
Mon Jul 26 16:43:54 EDT 2010


                                                    I am doing that this way:


//Inheriting of OpenLayers.Control.LayerSwitcher
MyLayerSwitcher.prototype = new OpenLayers.Control.LayerSwitcher;          
// Define sub-class
MyLayerSwitcher.prototype.constructor = MyLayerSwitcher;
function MyLayerSwitcher()
{
    OpenLayers.Control.LayerSwitcher.call(this);                                        
// derived constructor = call super-class constructor
}
 
MyLayerSwitcher.prototype.loadContents = function()                                
// redefine Method
{
    OpenLayers.Control.LayerSwitcher.prototype.loadContents.call(this);        
// Call super-class method 
    this.baseLbl.innerHTML = OpenLayers.i18n("xxx");                                  
//change title for base layers
    this.dataLbl.innerHTML = OpenLayers.i18n("yyy");                                  
//change title for overlays (empty string "" is an option, too)
}


Regards to All!
-- 
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Delete-title-in-layerswitcher-tp5320195p5339720.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.



More information about the Users mailing list