[Mapbender-commits] r5298 - trunk/mapbender/http/javascripts
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Thu Jan 7 11:19:55 EST 2010
Author: christoph
Date: 2010-01-07 11:19:54 -0500 (Thu, 07 Jan 2010)
New Revision: 5298
Modified:
trunk/mapbender/http/javascripts/mod_wfs_SpatialRequest.php
trunk/mapbender/http/javascripts/requestGeometryConstructor.js
Log:
naming conflict with digitizing, renamed to "wfs_"*
Modified: trunk/mapbender/http/javascripts/mod_wfs_SpatialRequest.php
===================================================================
--- trunk/mapbender/http/javascripts/mod_wfs_SpatialRequest.php 2010-01-07 16:19:02 UTC (rev 5297)
+++ trunk/mapbender/http/javascripts/mod_wfs_SpatialRequest.php 2010-01-07 16:19:54 UTC (rev 5298)
@@ -55,11 +55,11 @@
var mod_wfs_spatialRequest_win = null;
var mod_wfs_spatialRequest_thema = false;
-var button_point = "point";
-var button_polygon = "polygon";
-var button_rectangle = "rectangle";
-var button_extent = "extent";
-var button_dialogue = "dialogue";
+var button_point = "wfs_point";
+var button_polygon = "wfs_polygon";
+var button_rectangle = "wfs_rectangle";
+var button_extent = "wfs_extent";
+var button_dialogue = "wfs_dialogue";
var activeButton = null;
var mod_wfs_spatialRequestSubFunctions = [];
@@ -162,11 +162,11 @@
buttonWfs_title_on = [];
buttonWfs_x = [];
buttonWfs_y = [];
- addButtonWfs("rectangle", buttonRectangle.status, buttonRectangle.img, msgObj.buttonLabelRectangle, buttonRectangle.x, buttonRectangle.y);
- addButtonWfs("polygon", buttonPolygon.status, buttonPolygon.img, msgObj.buttonLabelPolygon, buttonPolygon.x, buttonPolygon.y);
- addButtonWfs("point", buttonPoint.status, buttonPoint.img, msgObj.buttonLabelPoint, buttonPoint.x, buttonPoint.y);
- addButtonWfs("extent", buttonExtent.status, buttonExtent.img, msgObj.buttonLabelExtent, buttonExtent.x, buttonExtent.y);
- addButtonWfs("dialogue", buttonDialogue.status, buttonDialogue.img, msgObj.buttonLabelDialogue, buttonDialogue.x, buttonDialogue.y);
+ addButtonWfs("wfs_rectangle", buttonRectangle.status, buttonRectangle.img, msgObj.buttonLabelRectangle, buttonRectangle.x, buttonRectangle.y);
+ addButtonWfs("wfs_polygon", buttonPolygon.status, buttonPolygon.img, msgObj.buttonLabelPolygon, buttonPolygon.x, buttonPolygon.y);
+ addButtonWfs("wfs_point", buttonPoint.status, buttonPoint.img, msgObj.buttonLabelPoint, buttonPoint.x, buttonPoint.y);
+ addButtonWfs("wfs_extent", buttonExtent.status, buttonExtent.img, msgObj.buttonLabelExtent, buttonExtent.x, buttonExtent.y);
+ addButtonWfs("wfs_dialogue", buttonDialogue.status, buttonDialogue.img, msgObj.buttonLabelDialogue, buttonDialogue.x, buttonDialogue.y);
displayButtons();
});
}
@@ -224,10 +224,10 @@
function wfsEnable(obj) {
var el = getMapDoc();
- el.onmouseover = null;
- el.onmousedown = null;
- el.onmouseup = null;
- el.onmousemove = null;
+ $(el).unbind("mousedown")
+ .unbind("mouseover")
+ .unbind("mouseup")
+ .unbind("mousemove");
if (obj.id == button_point) {
if (activeButton == null) {
@@ -259,7 +259,7 @@
function callRequestGeometryConstructor(selectedType,target){
spatialRequestType = selectedType;
var geometryConstructor = new RequestGeometryConstructor(target);
- geometryConstructor.getGeometry(selectedType,function(target,queryGeom){
+ geometryConstructor.getGeometry(selectedType.replace(/wfs_/, ""),function(target,queryGeom){
if(queryGeom !=''){
requestGeom = queryGeom;
}
@@ -308,12 +308,13 @@
function wfsDisable(obj) {
var ind = getMapObjIndexByName("mapframe1");
var el = mb_mapObj[ind].getDomElement();
- el.onmousedown = null;
- el.ondblclick = null;
- el.onmousemove = null;
+ $(el).unbind("mousedown")
+ .unbind("click")
+ .unbind("mousemove");
activeButton = null;
writeTag("","measure_display","");
writeTag("","measure_sub","");
+ console.log("TEST");
mb_setwfsrequest(mod_wfs_spatialRequest_target);
}
@@ -342,10 +343,10 @@
mod_wfs_spatialRequest_win.document.writeln('</script>');
mod_wfs_spatialRequest_win.document.writeln("<form>");
- mod_wfs_spatialRequest_win.document.writeln("<input id='point' name='geom' type='radio' value='"+button_point+"' onclick='set(this)'> Punkt<br>");
- mod_wfs_spatialRequest_win.document.writeln("<input id='rectangle' name='geom' type='radio' value='"+button_rectangle+"' onclick='set(this)'> Rechteck<br>");
- mod_wfs_spatialRequest_win.document.writeln("<input id='polygon' name='geom' type='radio' value='"+button_polygon+"'onclick='set(this)'> Polygon<br>");
- mod_wfs_spatialRequest_win.document.writeln("<input id='extent' name='geom' type='radio' value='"+button_extent+"'onclick='set(this)'> Extent<br>");
+ mod_wfs_spatialRequest_win.document.writeln("<input id='wfs_point' name='geom' type='radio' value='"+button_point+"' onclick='set(this)'> Punkt<br>");
+ mod_wfs_spatialRequest_win.document.writeln("<input id='wfs_rectangle' name='geom' type='radio' value='"+button_rectangle+"' onclick='set(this)'> Rechteck<br>");
+ mod_wfs_spatialRequest_win.document.writeln("<input id='wfs_polygon' name='geom' type='radio' value='"+button_polygon+"'onclick='set(this)'> Polygon<br>");
+ mod_wfs_spatialRequest_win.document.writeln("<input id='wfs_extent' name='geom' type='radio' value='"+button_extent+"'onclick='set(this)'> Extent<br>");
var checked = "";
mod_wfs_spatialRequest_win.document.writeln("</form>");
mod_wfs_spatialRequest_win.document.close();
Modified: trunk/mapbender/http/javascripts/requestGeometryConstructor.js
===================================================================
--- trunk/mapbender/http/javascripts/requestGeometryConstructor.js 2010-01-07 16:19:02 UTC (rev 5297)
+++ trunk/mapbender/http/javascripts/requestGeometryConstructor.js 2010-01-07 16:19:54 UTC (rev 5298)
@@ -61,28 +61,31 @@
var ind = getMapObjIndexByName(target);
var el = mb_mapObj[ind].getDomElement();
- el.onmouseover = null;
- el.onmousedown = null;
- el.onmouseup = null;
- el.onmousemove = null;
+ $(el).unbind("mousedown")
+ .unbind("mouseover")
+ .unbind("mouseup")
+ .unbind("mousemove");
if (queryType == "point") {
queryGeom = new Geometry(geomType.point);
- el.onmousedown = function (e) {
+ $(el).mousedown(function (e) {
realWorldPos = mapToReal(target,myMapObj.getMousePosition(e));
queryGeom.addPoint(realWorldPos);
callback(target, queryGeom);
- el.onmouseover = null;
- el.onmousedown = null;
- el.onmouseup = null;
- el.onmousemove = null;
+ $(el).unbind("mousedown")
+ .unbind("mouseover")
+ .unbind("mouseup")
+ .unbind("mousemove");
queryGeom = null;
- };
+ });
}
else if (queryType == "polygon") {
queryGeom = new Geometry(geomType.polygon);
- el.onmousedown = wfsSpatialRequestStart;
- el.onmousemove = wfsSpatialRequestRun;
+ $(el).mousedown(function (e) {
+ wfsSpatialRequestStart(e);
+ }).mousemove(function (e) {
+ wfsSpatialRequestRun(e);
+ });
}
else if (queryType == "rectangle") {
queryGeom = new Geometry(geomType.line);
@@ -126,10 +129,11 @@
queryGeom.addPoint(p0);
queryGeom.addPoint(p1);
callback(target, queryGeom);
- el.onmouseover = null;
- el.onmousedown = null;
- el.onmouseup = null;
- el.onmousemove = null;
+ $(el).unbind("mousedown")
+ .unbind("mouseover")
+ .unbind("mouseup")
+ .unbind("mousemove");
+
queryGeom = null;
}
@@ -161,10 +165,10 @@
writeTag(myMapObj.frameName, myMapObj.elementName+"_measure_display", "");
var ind = getMapObjIndexByName("mapframe1");
var el = mb_mapObj[ind].getDomElement();
- el.onmouseover = null;
- el.onmousedown = null;
- el.onmouseup = null;
- el.onmousemove = null;
+ $(el).unbind("mousedown")
+ .unbind("mouseover")
+ .unbind("mouseup")
+ .unbind("mousemove");
queryGeom = null;
return;
}
@@ -241,10 +245,10 @@
callback(that.geomTarget,queryGeom);
var ind = getMapObjIndexByName("mapframe1");
var el = mb_mapObj[ind].getDomElement();
- el.onmouseover = null;
- el.onmousedown = null;
- el.onmouseup = null;
- el.onmousemove = null;
+ $(el).unbind("mousedown")
+ .unbind("mouseover")
+ .unbind("mouseup")
+ .unbind("mousemove");
queryGeom = null;
}
else{
More information about the Mapbender_commits
mailing list