[Mapbender-commits] r2540 - trunk/mapbender/http/javascripts
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Mon Jun 23 11:58:56 EDT 2008
Author: christoph
Date: 2008-06-23 11:58:56 -0400 (Mon, 23 Jun 2008)
New Revision: 2540
Modified:
trunk/mapbender/http/javascripts/core.php
trunk/mapbender/http/javascripts/mod_addWMSgeneralFunctions.js
trunk/mapbender/http/javascripts/mod_adminNavigation.js
trunk/mapbender/http/javascripts/mod_box1.js
trunk/mapbender/http/javascripts/mod_digitize_tab.php
trunk/mapbender/http/javascripts/mod_pan.php
trunk/mapbender/http/javascripts/mod_perimeter.php
Log:
Modified: trunk/mapbender/http/javascripts/core.php
===================================================================
--- trunk/mapbender/http/javascripts/core.php 2008-06-23 15:58:18 UTC (rev 2539)
+++ trunk/mapbender/http/javascripts/core.php 2008-06-23 15:58:56 UTC (rev 2540)
@@ -19,7 +19,6 @@
ob_start();
header('Content-type: application/x-javascript');
-require_once(dirname(__FILE__) . "/../javascripts/event.js");
-require_once(dirname(__FILE__) . "/../javascripts/core.js");
-
+require_once(dirname(__FILE__) . "/../../lib/event.js");
+require_once(dirname(__FILE__) . "/../../lib/core.js");
?>
\ No newline at end of file
Modified: trunk/mapbender/http/javascripts/mod_addWMSgeneralFunctions.js
===================================================================
--- trunk/mapbender/http/javascripts/mod_addWMSgeneralFunctions.js 2008-06-23 15:58:18 UTC (rev 2539)
+++ trunk/mapbender/http/javascripts/mod_addWMSgeneralFunctions.js 2008-06-23 15:58:56 UTC (rev 2540)
@@ -1,3 +1,24 @@
+function mb_mapObjaddWMS(obj){
+ var cnt_layers = 0;
+ var cnt_querylayers = 0;
+ var styles = "";
+ var layers = "";
+ var querylayers = "";
+ var ind = getMapObjIndexByName(obj);
+ //is the id valid?
+ for( var i=0; i<(wms.length-1); i++){
+ if(parseInt(wms[i].wms_id, 10) >= parseInt(wms[wms.length-1].wms_id, 10)){
+ wms[wms.length-1].wms_id = parseInt(mb_mapObj[ind].wms[i].wms_id, 10) + 1;
+ }
+ }
+ mb_mapObj[ind].wms[mb_mapObj[ind].wms.length] = wms[wms.length-1];
+ mb_mapObj[ind].layers[mb_mapObj[ind].layers.length] = layers;
+ mb_mapObj[ind].styles[mb_mapObj[ind].styles.length] = styles;
+ mb_mapObj[ind].querylayers[mb_mapObj[ind].querylayers.length] = querylayers;
+ mb_execloadWmsSubFunctions();
+ return true;
+}
+
function mod_addWMS_load(caps){
window.frames['loadData'].document.location.href = "../php/mod_createJSObjFromXML.php?caps=" + encodeURIComponent(caps);
}
Modified: trunk/mapbender/http/javascripts/mod_adminNavigation.js
===================================================================
--- trunk/mapbender/http/javascripts/mod_adminNavigation.js 2008-06-23 15:58:18 UTC (rev 2539)
+++ trunk/mapbender/http/javascripts/mod_adminNavigation.js 2008-06-23 15:58:56 UTC (rev 2540)
@@ -1,4 +1,5 @@
function mod_adminNavigation_init(){
+ eventInit.trigger();
for (var i=0; i< document.getElementsByTagName("a").length; i++){
document.getElementsByTagName("a")[i].onclick = new Function("mod_adminNavigation(this)");
}
Modified: trunk/mapbender/http/javascripts/mod_box1.js
===================================================================
--- trunk/mapbender/http/javascripts/mod_box1.js 2008-06-23 15:58:18 UTC (rev 2539)
+++ trunk/mapbender/http/javascripts/mod_box1.js 2008-06-23 15:58:56 UTC (rev 2540)
@@ -8,6 +8,10 @@
var mb_isBF = false;
var mb_zF = false;
+var mb_offset_top = 0;
+var mb_offset_right = 0;
+var mb_offset_bottom = 0;
+var mb_offset_left = 0;
function mod_box_start(e){
mb_isActive = true;
Modified: trunk/mapbender/http/javascripts/mod_digitize_tab.php
===================================================================
--- trunk/mapbender/http/javascripts/mod_digitize_tab.php 2008-06-23 15:58:18 UTC (rev 2539)
+++ trunk/mapbender/http/javascripts/mod_digitize_tab.php 2008-06-23 15:58:56 UTC (rev 2540)
@@ -135,8 +135,13 @@
executeDigitizeSubFunctions();
}
+function mb_registerGML(frameName,obj){
+ var ind = parent.getMapObjIndexByName(frameName);
+ parent.mb_mapObj[ind].geom = obj;
+}
+
function mod_digitize_go(e){
- parent.mb_registerGML(mod_digitize_target,d);
+ mb_registerGML(mod_digitize_target,d);
// ie workaround
if (e == undefined) {
Modified: trunk/mapbender/http/javascripts/mod_pan.php
===================================================================
--- trunk/mapbender/http/javascripts/mod_pan.php 2008-06-23 15:58:18 UTC (rev 2539)
+++ trunk/mapbender/http/javascripts/mod_pan.php 2008-06-23 15:58:56 UTC (rev 2540)
@@ -28,6 +28,9 @@
var mod_pan_img_off = new Image(); mod_pan_img_off.src = "<?php echo $e_src; ?>";
var mod_pan_img_over = new Image(); mod_pan_img_over.src = "<?php echo preg_replace("/_off/","_over",$e_src); ?>";
+
+var mb_panActive = false;
+
function init_mod_pan(ind){
mb_button[ind] = document.getElementById(mod_pan_elName);
mb_button[ind].img_over = mod_pan_img_over.src;
Modified: trunk/mapbender/http/javascripts/mod_perimeter.php
===================================================================
--- trunk/mapbender/http/javascripts/mod_perimeter.php 2008-06-23 15:58:18 UTC (rev 2539)
+++ trunk/mapbender/http/javascripts/mod_perimeter.php 2008-06-23 15:58:56 UTC (rev 2540)
@@ -36,6 +36,40 @@
var mod_perimeter_status = 0;
var mod_perimeter_img_obj = null;
+function mb_checkTag(frameName, tagName, elementId, appendAtTagName, attributes){
+ var oldElement;
+ var newElement;
+ var prefix;
+ if(frameName && frameName !== ""){
+ prefix = window.frames[frameName].document;
+ }
+ else if(!frameName || frameName === ""){
+ prefix = document;
+ }
+ oldElement = prefix.getElementById(elementId);
+ if (oldElement === null) {
+ newElement = prefix.createElement(tagName);
+ newElement = prefix.getElementsByTagName(appendAtTagName)[0].appendChild(newElement);
+ }
+ else {
+ if (oldElement.nodeName.toLowerCase() == tagName.toLowerCase()) {
+ for (var i=0; i<attributes.length; i++) {
+ oldElement.setAttribute(attributes[i][0], attributes[i][1]);
+ }
+ return oldElement;
+ }
+ else {
+ return false;
+ }
+ }
+ var newElementAttributeNode = document.createAttribute("id");
+ newElementAttributeNode.value = elementId;
+ newElement.setAttributeNode(newElementAttributeNode);
+ for (var i=0; i<attributes.length; i++) {
+ newElement.setAttribute(attributes[i][0], attributes[i][1]);
+ }
+ return newElement;
+}
function mod_perimeter_checkDefaults(){
try{var t = mod_perimeter_thickness;}catch(e){mod_perimeter_thickness = 2;}
try{var t = mod_perimeter_color;}catch(e){mod_perimeter_color = '#000000';}
More information about the Mapbender_commits
mailing list