[Mapbender-commits] r1706 - trunk/mapbender/http/javascripts
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Tue Oct 2 10:39:55 EDT 2007
Author: verenadiewald
Date: 2007-10-02 10:39:55 -0400 (Tue, 02 Oct 2007)
New Revision: 1706
Modified:
trunk/mapbender/http/javascripts/map_obj.js
Log:
under construction for stylehandling
Modified: trunk/mapbender/http/javascripts/map_obj.js
===================================================================
--- trunk/mapbender/http/javascripts/map_obj.js 2007-10-02 14:14:36 UTC (rev 1705)
+++ trunk/mapbender/http/javascripts/map_obj.js 2007-10-02 14:39:55 UTC (rev 1706)
@@ -268,15 +268,33 @@
};
/**
+ * get the title of the current layer
+ *
+ * @param layername
+ * @return the title of the given layer
+ * @type string
+ */
+wms_const.prototype.getTitleByLayerName = function(layername){
+ for(var i=0; i< this.objLayer.length; i++){
+ if(this.objLayer[i].layer_name == layername){
+ return this.objLayer[i].layer_title;
+ }
+ }
+};
+
+/**
* get the style of the layer
*
* @param layername
* @return the stylename of the given layer
* @type string
*/
-wms_const.prototype.getStyleByLayerName = function(layername){
- //todo: get gui_layer_style
- return false;
+wms_const.prototype.getCurrentStyleByLayerName = function(layername){
+ for(var i=0; i< this.objLayer.length; i++){
+ if(this.objLayer[i].layer_name == layername){
+ return this.objLayer[i].gui_layer_style;
+ }
+ }
};
/**
More information about the Mapbender_commits
mailing list