[Mapbender-commits] r4073 - in trunk/mapbender: core http/javascripts

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Mon Jun 22 13:14:03 EDT 2009


Author: verenadiewald
Date: 2009-06-22 13:14:02 -0400 (Mon, 22 Jun 2009)
New Revision: 4073

Modified:
   trunk/mapbender/core/system.php
   trunk/mapbender/http/javascripts/mod_scaleSel.php
Log:
Mapbender API

Modified: trunk/mapbender/core/system.php
===================================================================
--- trunk/mapbender/core/system.php	2009-06-22 16:01:10 UTC (rev 4072)
+++ trunk/mapbender/core/system.php	2009-06-22 17:14:02 UTC (rev 4073)
@@ -1,6 +1,6 @@
 <?php
 # $Id$
-# Copyright (C) 2002 CCGIS 
+# Copyright (C) 2002 CCGIS
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -30,10 +30,10 @@
 define("MB_FEATURE_COUNT", "100");
 define("MB_SECURITY_PROXY", "http://wms1.ccgis.de/mapbender/tools/security_proxy.php?mb_ows_security_proxy=");
 #
-# available log levels 
+# available log levels
 #
 define("LOG_LEVEL_LIST", "off,error,warning,notice,all");
 
 define("ZOOM_MOUSEWHEEL", "1.1");
 
-define("MODULES_NOT_RELYING_ON_GLOBALS", "mapframe1,featureInfo1,gazetteerWFS,back,forward,zoomIn1,zoomOut1,selArea1,pan1,copyright,dependentDiv,dragMapSize,dynamicOverview,FeatureInfoRedirect,highlightPOI,navFrame,sandclock,scaleBar,scaleSel,setBBOX,setPOI2Scale,copyright");
+define("MODULES_NOT_RELYING_ON_GLOBALS", "mapframe1,featureInfo1,gazetteerWFS,back,forward,zoomFull,zoomIn1,zoomOut1,selArea1,pan1,copyright,dependentDiv,dragMapSize,dynamicOverview,FeatureInfoRedirect,highlightPOI,navFrame,sandclock,scaleBar,scaleSelect,setBBOX,setPOI2Scale");

Modified: trunk/mapbender/http/javascripts/mod_scaleSel.php
===================================================================
--- trunk/mapbender/http/javascripts/mod_scaleSel.php	2009-06-22 16:01:10 UTC (rev 4072)
+++ trunk/mapbender/http/javascripts/mod_scaleSel.php	2009-06-22 17:14:02 UTC (rev 4073)
@@ -1,7 +1,7 @@
 <?php
 # $Id$
 # http://www.mapbender.org/index.php/mod_scaleSel.php
-# Copyright (C) 2002 CCGIS 
+# Copyright (C) 2002 CCGIS
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -16,22 +16,27 @@
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+?>
+var mod_scaleSelect_target = options.target;
 
-require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
-echo "var mod_scaleSelect_target = '".$e_target[0]."';";
-?>
 eventAfterMapRequest.register(function (obj) {
 	mod_scaleSelect_val(obj.map.elementName);
 });
+
 function mod_scaleSelect(obj){
+	var myMapObj = Mapbender.Modules[mod_scaleSelect_target];
 	var ind = obj.selectedIndex;
-	mb_repaintScale(mod_scaleSelect_target,null,null,obj.options[ind].value);
+	myMapObj.repaintScale(null,null,obj.options[ind].value);
 }
 function mod_scaleSelect_val(frameName){
 	if(frameName == mod_scaleSelect_target){
-		var ind = getMapObjIndexByName(frameName);
-		var scale = mb_mapObj[ind].getScale();
+		var myMapObj = Mapbender.Modules[mod_scaleSelect_target];
+		var scale = myMapObj.getScale();
 		document.getElementById("scaleSelect").options[0].text = "1 : " + scale;
 		document.getElementById("scaleSelect").options[0].selected = true;
 	}
 }
+
+$(this).change(function () {
+	mod_scaleSelect(this);
+});
\ No newline at end of file



More information about the Mapbender_commits mailing list