[Mapbender-commits] r2731 - branches/2.5/http/javascripts
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Mon Jul 28 03:47:03 EDT 2008
Author: christoph
Date: 2008-07-28 03:47:03 -0400 (Mon, 28 Jul 2008)
New Revision: 2731
Modified:
branches/2.5/http/javascripts/geometry.js
branches/2.5/http/javascripts/mod_wfs_SpatialRequest.php
Log:
commit from verenas machine
Modified: branches/2.5/http/javascripts/geometry.js
===================================================================
--- branches/2.5/http/javascripts/geometry.js 2008-07-28 06:58:34 UTC (rev 2730)
+++ branches/2.5/http/javascripts/geometry.js 2008-07-28 07:47:03 UTC (rev 2731)
@@ -501,7 +501,7 @@
}
return true;
};
-
+
this.list = [];
this.e = new Wfs_element();
this.geomType = geomType;
@@ -1057,6 +1057,19 @@
};
/**
+ * removes an element with a given name. If an element with this name exists, it is removed.
+ *
+ * @param {String} aName the name of the element to delete
+ */
+ this.delElement = function(aName){
+ var i = this.getElementIndexByName(aName);
+ if (i !== false) {
+ name.splice(i, 1);
+ value.splice(i, 1);
+ }
+ }
+
+ /**
* checks if an index is valid
*
* @private
@@ -1143,7 +1156,9 @@
* @param {String} col a color
* @private
*/
- this.drawGeometry = function(t,g,col){
+ this.drawGeometry = function(t,g,col){
+ //console.log("geometry = %s",g);
+ //console.log("t = %s",t);
if(t == geomType.point) {
var poiIcon = g.e.getElementValueByName("Mapbender:icon");
for(var i=0, ilen = g.count(); i < ilen; i++){
@@ -1262,17 +1277,27 @@
* @param {Float} y y coordinate within the map frame
*/
var displayIcon = function (url, x, y) {
- var newImg = document.createElement("img");
- newImg.src = url;
- newImg.className = "mapsymbol";
- newImg.style.cursor = "help";
- newImg.style.position = "absolute";
-
- // center the image at x, y
- newImg.style.top = y - Math.round(newImg.height/2);
- newImg.style.left = x - Math.round(newImg.width/2);
- newImg.style.zIndex = 100;
- that.canvasDivTag.getTag().appendChild(newImg);
+ if(ie){
+ var newImg = document.createElement("img");
+ var newImgTop = y - Math.round(80/2);
+ var newImgLeft = x - Math.round(80/2);
+ that.canvasDivTag.getTag().innerHTML = "<img src='" + url + "' style='position:absolute;top:"+newImgTop+";left:"+newImgLeft+";z-index:100'/>";
+ }
+ else{
+ var newImg = document.createElement("img");
+ newImg.src = url;
+ that.canvasDivTag.getTag().appendChild(newImg);
+ //newImg.className = "mapsymbol";
+ //newImg.style.cursor = "help";
+ newImg.style.position = "absolute";
+
+ // center the image at x, y
+ newImg.style.top = y - Math.round(80/2);
+ newImg.style.left = x - Math.round(80/2);
+ // newImg.style.top = y - Math.round(80);
+ // newImg.style.left = x;
+ newImg.style.zIndex = 100;
+ }
};
/**
Modified: branches/2.5/http/javascripts/mod_wfs_SpatialRequest.php
===================================================================
--- branches/2.5/http/javascripts/mod_wfs_SpatialRequest.php 2008-07-28 06:58:34 UTC (rev 2730)
+++ branches/2.5/http/javascripts/mod_wfs_SpatialRequest.php 2008-07-28 07:47:03 UTC (rev 2731)
@@ -446,7 +446,7 @@
for (var i=0; i<mb_mapObj[ind].wms.length; i++){
for(var ii=0; ii<mb_mapObj[ind].wms[i].objLayer.length; ii++){
var o = mb_mapObj[ind].wms[i].objLayer[ii];
- if(o.gui_layer_wfs_featuretype != '' && o.gui_layer_querylayer == '1'){
+ if(o.gui_layer_wfs_featuretype != '' && o.gui_layer_querylayer == '1' && o.gui_layer_visible == '1'){
db_wfs_conf_id[db_wfs_conf_id.length] = o.gui_layer_wfs_featuretype;
}
}
@@ -458,7 +458,6 @@
}
numberOfAjaxCalls = js_wfs_conf_id.length;
-
if(queryGeom.geomType==geomType.polygon){
for(var i=0; i<js_wfs_conf_id.length; i++){
@@ -783,4 +782,4 @@
}
if(wfsResultToPopupDiv==1){
mb_registerWfsReadSubFunctions(function(geom){displayPopup(geom);});
-}
\ No newline at end of file
+}
More information about the Mapbender_commits
mailing list