[Mapbender-commits] r9734 - in trunk/mapbender/http/extensions/mobilemap: . _build js mod_mapbender

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Fri May 5 03:46:18 PDT 2017


Author: armin11
Date: 2017-05-05 03:46:18 -0700 (Fri, 05 May 2017)
New Revision: 9734

Modified:
   trunk/mapbender/http/extensions/mobilemap/_build/ngms_event.js
   trunk/mapbender/http/extensions/mobilemap/_build/ngms_event.min.js
   trunk/mapbender/http/extensions/mobilemap/js/ngms_event.min.js
   trunk/mapbender/http/extensions/mobilemap/map.php
   trunk/mapbender/http/extensions/mobilemap/mod_mapbender/search.js
Log:
New option to disable the default height info request by get parameter withHeight=0

Modified: trunk/mapbender/http/extensions/mobilemap/_build/ngms_event.js
===================================================================
--- trunk/mapbender/http/extensions/mobilemap/_build/ngms_event.js	2017-04-11 13:56:39 UTC (rev 9733)
+++ trunk/mapbender/http/extensions/mobilemap/_build/ngms_event.js	2017-05-05 10:46:18 UTC (rev 9734)
@@ -757,6 +757,9 @@
 				new OpenLayers.Feature.Vector(geompoint,{},olSearchSymbol),
 				new OpenLayers.Feature.Vector(geompoint1,{},olFeaturequerySymbol)
 			]);
+ 			/*if (withHeight) {
+				alert("withHeight is true");
+			}*/
 			if ($("#select-feature-info").val() === 'p') {
 				var fiPopUp = true; 
 			} else {
@@ -766,7 +769,7 @@
 			if (fiPopUp == true ) {
 				setMarkerhint(window.lang.convert('Meldung:'),window.lang.convert('bitte warten...'));
 			} else {
-				if (querylayer.length == 0) {
+				if ((querylayer.length == 0 && withHeight) || (querylayer.length == 1 && withHeight == false)) {
 					//featureInfo on dhm
 					setMarkerhint(window.lang.convert('Meldung:'),window.lang.convert('bitte warten...'));
 				} else {
@@ -777,9 +780,9 @@
 			//SP: Reset Feature List
 			$("#featurelist").empty();
 			//SP: DHM Höhe in Ergebnisliste
-			getHeight(lonlat.lon, lonlat.lat, actuallang);
+			getHeight(lonlat.lon, lonlat.lat, actuallang);					
 			// Query Layer
-	 		if(querylayer.length > 0) {
+	 		if(querylayer.length > 0 && withHeight) {
 				//SP: alle queryable layers iterieren
 				for (var i = 0; i < querylayer.length; i++) {
 					//SP: bei nur einem Feature direkte Referenz, ansonsten array
@@ -831,10 +834,51 @@
 					} //end if layer checked	
 				} //end for
 			} else {
-			// Standardabfrage, falls keiner ausgewählt ist
-			//d.h. dhm!
-			var featureurl = 'query/rasterqueryWms.php?coord='+lonlat.lon+ ', '+lonlat.lat+'&lang='+actuallang;
-			loadFeature(featureurl);	
+				if (querylayer.length == 1 && withHeight == false) {
+					//SP: alle queryable layers iterieren
+					for (var i = 0; i < querylayer.length; i++) {
+						//SP: bei nur einem Feature direkte Referenz, ansonsten array
+						var ql = querylayer;
+						if (querylayer.length > 1) ql = $(querylayer[i]);
+						//SP: check layer visible
+						if (ql.find('.layer_checked').length > 0) {
+							// Abfrage des ausgewählten Layers
+							//if abfrage ob ? vorkommt dann & sonst Fragezeichen
+							var featureurl = ql.attr('getmapurl')
+									+ '&SERVICE=WMS&REQUEST=getFeatureInfo&VERSION=1.1.1'
+									+ '&mapfile='+ ql.attr('name')
+									+ '&layers=' + ql.attr('name') + '&QUERY_LAYERS=' + ql.attr('name')
+									+ '&SRS=' + featurequerySrc 
+									+ '&BBOX=' + map.getExtent().toBBOX()
+									+ '&WIDTH=' + map.size.w + '&HEIGHT=' + map.size.h
+									+ '&X=' + evt.xy.x + '&Y=' + evt.xy.y
+									+ '&INFO_FORMAT=text/html' 
+									+ '&FORMAT=image/png' //only for some wms that have problems if this parameter is not given
+									+ '&STYLES=' //only for some wms that have problems if this parameter is not given
+									+ '&FEATURE_COUNT=100';
+
+							// Legende für Feature Info
+							var legendurl = ql.attr('getmapurl')
+									+ 'service=wms&version=1.1.1'
+									+ '&request=GetLegendGraphic'
+									+ '&format=image/png'
+									+ '&layer=' + ql.attr('name');
+						
+							//SP: check empty feature result!
+							featureValid(new FeatureResult(ql.attr('title'), layerInList($('#ownlist'), ql.attr('layerid')), featureurl, legendurl));
+							var iframe=$('<iframe src="'+featureurl+'" class="query_iframe">'
+								+'<p>Die Abfrage kann leider nicht angezeigt werden.</p></img>'
+							);
+							setMarkerhint('Abfrageergebnis:',iframe);
+							//loadFeature(featureurl);
+						} //end if layer checked	
+					} //end for
+				} else {
+					// Standardabfrage, falls keiner ausgewählt ist
+					//d.h. dhm!
+					var featureurl = 'query/rasterqueryWms.php?coord='+lonlat.lon+ ', '+lonlat.lat+'&lang='+actuallang;
+					loadFeature(featureurl);
+				}	
 		}
 	 },
 

Modified: trunk/mapbender/http/extensions/mobilemap/_build/ngms_event.min.js
===================================================================
--- trunk/mapbender/http/extensions/mobilemap/_build/ngms_event.min.js	2017-04-11 13:56:39 UTC (rev 9733)
+++ trunk/mapbender/http/extensions/mobilemap/_build/ngms_event.min.js	2017-05-05 10:46:18 UTC (rev 9734)
@@ -27,11 +27,13 @@
 function FeatureResult(a,b,c,d){this.layername=a;this.position=b;this.url=c;this.html=$("<div>",{"data-sort":b});b=$('<div class="collapsible unselected" data-role="collapsible" data-collapsed="true" data-theme="a" data-content-theme="c" data-inline="true" data-inset="true"></div>');b.append("<h3>"+a+"</h3>");b.append($('<div class="legendcontainer" data-role="content"><img src="'+d+'"></div>'));a=$('<a data-role="button" data-icon="arrow-r" data-iconpos="right" target="_blank" href="'+c+'">Info</a>');
 c=$('<div class="ui-grid-a">');d=$('<div class="ui-block-a">');d.append(b);b=$('<div class="ui-block-b">');b.append(a);c.append(d);c.append(b);this.html.append(c)}var maxlayers=5,maxresults=40,baseinfo=[];searchUrl="mod_mapbender/search_proxy.php?languageCode=de&resultTarget=web&maxResults="+maxresults;
 function addmyLayer(){OpenLayers.Control.Click=OpenLayers.Class(OpenLayers.Control,{defaultHandlerOptions:{single:!0,pixelTolerance:0,stopSingle:!1},initialize:function(a){this.handlerOptions=OpenLayers.Util.applyDefaults((a||{}).handlerOptions||{},this.defaultHandlerOptions);OpenLayers.Control.prototype.initialize.apply(this,arguments);this.handler=new OpenLayers.Handler.Click(this,{click:this.onClick},this.handlerOptions)},onClick:function(a){var b=map.getLonLatFromViewPortPx(a.xy),c=$("#ownlist").find(".query_checked").parent(),
-d=$("#select-lang").val(),e=new OpenLayers.Geometry.Point(b.lon,b.lat),f=new OpenLayers.Geometry.Point(b.lon,b.lat);vector_marker.removeAllFeatures();vector_marker.addFeatures([new OpenLayers.Feature.Vector(e,{},olSearchSymbol),new OpenLayers.Feature.Vector(f,{},olFeaturequerySymbol)]);e="p"===$("#select-feature-info").val()?!0:!1;!0==e?setMarkerhint(window.lang.convert("Meldung:"),window.lang.convert("bitte warten...")):0==c.length?setMarkerhint(window.lang.convert("Meldung:"),window.lang.convert("bitte warten...")):
-$.mobile.changePage($("#featureinforesult"),pageTransition);$("#featurelist").empty();getHeight(b.lon,b.lat,d);if(0<c.length)for(b=0;b<c.length;b++){if(d=c,1<c.length&&(d=$(c[b])),0<d.find(".layer_checked").length){var f=d.attr("getmapurl")+"&SERVICE=WMS&REQUEST=getFeatureInfo&VERSION=1.1.1&mapfile="+d.attr("name")+"&layers="+d.attr("name")+"&QUERY_LAYERS="+d.attr("name")+"&SRS="+featurequerySrc+"&BBOX="+map.getExtent().toBBOX()+"&WIDTH="+map.size.w+"&HEIGHT="+map.size.h+"&X="+a.xy.x+"&Y="+a.xy.y+
-"&INFO_FORMAT=text/html&FORMAT=image/png&STYLES=&FEATURE_COUNT=100",g=d.attr("getmapurl")+"service=wms&version=1.1.1&request=GetLegendGraphic&format=image/png&layer="+d.attr("name");featureValid(new FeatureResult(d.attr("title"),layerInList($("#ownlist"),d.attr("layerid")),f,g));e?(d=$('<iframe src="'+f+'" class="query_iframe"><p>Die Abfrage kann leider nicht angezeigt werden.</p></img>'),setMarkerhint("Abfrageergebnis:",d)):(d=$('<iframe src="'+f+'" class="query_iframe_full"><p>Die Abfrage kann leider nicht angezeigt werden.</p></img>'),
-$("#ficontentdiv").text(""),$("#ficontentdiv").append(d))}}else f="query/rasterqueryWms.php?coord="+b.lon+", "+b.lat+"&lang="+d,loadFeature(f)},CLASS_NAME:"OpenLayers.Control.Click"});$("#mapbenderbut").click(function(){$.mobile.changePage($("#mod_mapbender"),pageTransition);refresh()});$("#mapbendersearchformbut").click(function(){searchMaps(searchUrl+"&searchText="+$("#mapbendersearchfield").val())});$(document).on("keypress","#mapbendersearchfield",function(a){13===a.keyCode&&searchMaps(searchUrl+
-"&searchText="+$("#mapbendersearchfield").val())});$(document).on("expand","div[data-role=collapsible]",function(){$("div[data-role=collapsible]").not($(this)).trigger("collapse")});$(".addToMapBut").click(function(){$("div[data-role=collapsible]").not(".ui-collapsible-collapsed").trigger("collapse");$.mobile.changePage($("#mappage"),pageTransition)});addBaselayers()}function addFeatureCallback(a){$("#featurelist").append(a.html);refreshFeatureResults()}
+d=$("#select-lang").val(),e=new OpenLayers.Geometry.Point(b.lon,b.lat),f=new OpenLayers.Geometry.Point(b.lon,b.lat);vector_marker.removeAllFeatures();vector_marker.addFeatures([new OpenLayers.Feature.Vector(e,{},olSearchSymbol),new OpenLayers.Feature.Vector(f,{},olFeaturequerySymbol)]);e="p"===$("#select-feature-info").val()?!0:!1;!0==e?setMarkerhint(window.lang.convert("Meldung:"),window.lang.convert("bitte warten...")):0==c.length&&withHeight||1==c.length&&!1==withHeight?setMarkerhint(window.lang.convert("Meldung:"),
+window.lang.convert("bitte warten...")):$.mobile.changePage($("#featureinforesult"),pageTransition);$("#featurelist").empty();getHeight(b.lon,b.lat,d);if(0<c.length&&withHeight)for(b=0;b<c.length;b++){if(d=c,1<c.length&&(d=$(c[b])),0<d.find(".layer_checked").length){var f=d.attr("getmapurl")+"&SERVICE=WMS&REQUEST=getFeatureInfo&VERSION=1.1.1&mapfile="+d.attr("name")+"&layers="+d.attr("name")+"&QUERY_LAYERS="+d.attr("name")+"&SRS="+featurequerySrc+"&BBOX="+map.getExtent().toBBOX()+"&WIDTH="+map.size.w+
+"&HEIGHT="+map.size.h+"&X="+a.xy.x+"&Y="+a.xy.y+"&INFO_FORMAT=text/html&FORMAT=image/png&STYLES=&FEATURE_COUNT=100",g=d.attr("getmapurl")+"service=wms&version=1.1.1&request=GetLegendGraphic&format=image/png&layer="+d.attr("name");featureValid(new FeatureResult(d.attr("title"),layerInList($("#ownlist"),d.attr("layerid")),f,g));e?(d=$('<iframe src="'+f+'" class="query_iframe"><p>Die Abfrage kann leider nicht angezeigt werden.</p></img>'),setMarkerhint("Abfrageergebnis:",d)):(d=$('<iframe src="'+f+'" class="query_iframe_full"><p>Die Abfrage kann leider nicht angezeigt werden.</p></img>'),
+$("#ficontentdiv").text(""),$("#ficontentdiv").append(d))}}else if(1==c.length&&!1==withHeight)for(b=0;b<c.length;b++)d=c,1<c.length&&(d=$(c[b])),0<d.find(".layer_checked").length&&(f=d.attr("getmapurl")+"&SERVICE=WMS&REQUEST=getFeatureInfo&VERSION=1.1.1&mapfile="+d.attr("name")+"&layers="+d.attr("name")+"&QUERY_LAYERS="+d.attr("name")+"&SRS="+featurequerySrc+"&BBOX="+map.getExtent().toBBOX()+"&WIDTH="+map.size.w+"&HEIGHT="+map.size.h+"&X="+a.xy.x+"&Y="+a.xy.y+"&INFO_FORMAT=text/html&FORMAT=image/png&STYLES=&FEATURE_COUNT=100",
+g=d.attr("getmapurl")+"service=wms&version=1.1.1&request=GetLegendGraphic&format=image/png&layer="+d.attr("name"),featureValid(new FeatureResult(d.attr("title"),layerInList($("#ownlist"),d.attr("layerid")),f,g)),d=$('<iframe src="'+f+'" class="query_iframe"><p>Die Abfrage kann leider nicht angezeigt werden.</p></img>'),setMarkerhint("Abfrageergebnis:",d));else f="query/rasterqueryWms.php?coord="+b.lon+", "+b.lat+"&lang="+d,loadFeature(f)},CLASS_NAME:"OpenLayers.Control.Click"});$("#mapbenderbut").click(function(){$.mobile.changePage($("#mod_mapbender"),
+pageTransition);refresh()});$("#mapbendersearchformbut").click(function(){searchMaps(searchUrl+"&searchText="+$("#mapbendersearchfield").val())});$(document).on("keypress","#mapbendersearchfield",function(a){13===a.keyCode&&searchMaps(searchUrl+"&searchText="+$("#mapbendersearchfield").val())});$(document).on("expand","div[data-role=collapsible]",function(){$("div[data-role=collapsible]").not($(this)).trigger("collapse")});$(".addToMapBut").click(function(){$("div[data-role=collapsible]").not(".ui-collapsible-collapsed").trigger("collapse");
+$.mobile.changePage($("#mappage"),pageTransition)});addBaselayers()}function addFeatureCallback(a){$("#featurelist").append(a.html);refreshFeatureResults()}
 function getHeight(a,b,c){$.ajax({type:"GET",url:"query/rasterqueryWms.php?coord="+a+", "+b+"&lang="+c,success:function(a){if(a){5>a.length&&(a=window.lang.convert("Kein Ergebnis!"));var b=$("<div>"),c=$('<div class="collapsible unselected" data-role="collapsible" data-collapsed="true" data-theme="a" data-content-theme="c" data-inline="true" data-inset="true"></div>');c.append("<h3>DHM</h3>");c.append(a);b.append(c);$("#featurelist").prepend(b);refreshFeatureResults()}}})}
 function featureValid(a){$.ajax({url:"map.php",type:"POST",data:{feature_url:a.url},success:function(b){"true"==b.split("\n")[0]&&addFeatureCallback(a)}})}
 function preview(a,b,c){$.ajax({previewurl:a,layerid:b,bbox:c,success:function(){$("#preview").find("div[data-role=content]").empty();$("#preview").find("div[data-role=content]").append('<img src="'+$(this).attr("previewurl")+'" alt="image" style="width:200px;">');var a=$(this).attr("bbox"),b=$(this).attr("layerid");$("#preview_zoom").click(function(){getOpenlayersIndex(b);zoomToBbox(a);$.mobile.changePage($("#mappage"),pageTransition)});$("#preview").popup("open")}})}

Modified: trunk/mapbender/http/extensions/mobilemap/js/ngms_event.min.js
===================================================================
--- trunk/mapbender/http/extensions/mobilemap/js/ngms_event.min.js	2017-04-11 13:56:39 UTC (rev 9733)
+++ trunk/mapbender/http/extensions/mobilemap/js/ngms_event.min.js	2017-05-05 10:46:18 UTC (rev 9734)
@@ -20,36 +20,49 @@
 function BaseLayer(a,b){return $("<div>",{text:a,title:a,layerids:b,"class":"baselayer base_unchecked"}).click(function(){switchVisibility($(this))})}
 function ResultLayer(a,b,c,d,e,f,g,h){a=$("<div>",{layerid:a,name:c,"class":"layer",title:b,desc:d,previewUrl:e,queryable:f,getMapURL:g,bbox:h});a.append($("<div>",{"class":"icon query_preview "+(f?"query_info":"query_noinfo"),text:" "}));a.append($("<div>",{"class":"layer_icon icon layer_add",text:" "}).click(function(){switchLayer($(this).parent())}));a.append('<div class="collapsible unselected" data-role="collapsible" data-collapsed="true" data-theme="a" data-content-theme="c" data-inset="true"><h3>'+
 b+"</h3><h3>"+b+"</h3><p>"+d+"</p></div>");return a}
-function OwnLayer(a,b,c,d,e,f,g,h,j,k,l){c=$("<div>",{layerid:a,name:c,servicetitle:e,servicedesc:f,"class":"layer",title:b,desc:d,previewUrl:g,queryable:h,getMapURL:j,bbox:k,avail:l});c.append($("<div>",{"class":"layer_icon icon layer_remove",text:" "}).click(function(){removeLayer($(this).parent())}));h?c.append($("<div>",{"class":"icon query_queryable query_unchecked",text:" "}).click(function(){query_check($(this))})):c.append($("<div>",{"class":"icon query_queryable query_noinfo",text:" "}));
-c.append($("<div>",{"class":"icon layer_visibility layer_checked",text:" "}).click(function(){switchVisibility($(this).parent())}));c.append($("<div>",{"class":"icon move arrow_up",text:" "}).click(function(){up(a)}));h=$('<div class="collapsible unselected" data-role="collapsible" data-collapsed="true" data-theme="a" data-content-theme="c" data-inset="true"></div>');h.append("<h3>"+b+"</h3>");var j=$("<table></table>"),m=$("<tr></tr>"),n=$('<td class="layerinfo"></td>');g&&n.append($("<div>",{"class":"icon layer_preview",
-text:" "}).click(function(){zoomToBbox(k);$.mobile.changePage($("#mappage"),pageTransition)}));n.append("</br><p>"+l+"%</p>");g=$("<td></td>");g.append("<p><b>"+e+"</b></p><p>"+f+"</p>");g.append("<p><b>"+b+"</b></p><p>"+d+"</p>");m.append(n);m.append(g);j.append(m);h.append(j);c.append(h);return c}var maxlayers=5,maxresults=40,baseinfo=[];searchUrl="mod_mapbender/search_proxy.php?languageCode=de&resultTarget=web&maxResults="+maxresults;
+function OwnLayer(a,b,c,d,e,f,g,h,j,k,l){var m=$("<div>",{layerid:a,name:c,servicetitle:e,servicedesc:f,"class":"layer",title:b,desc:d,previewUrl:g,queryable:h,getMapURL:j,bbox:k,avail:l});m.append($("<div>",{"class":"layer_icon icon layer_remove",text:" "}).click(function(){removeLayer($(this).parent())}));h?m.append($("<div>",{"class":"icon query_queryable query_unchecked",text:" "}).click(function(){query_check($(this))})):m.append($("<div>",{"class":"icon query_queryable query_noinfo",text:" "}));
+m.append($("<div>",{"class":"icon layer_visibility layer_checked",text:" "}).click(function(){switchVisibility($(this).parent())}));m.append($("<div>",{"class":"icon move arrow_up",text:" "}).click(function(){up(a)}));h=$('<div class="collapsible unselected" data-role="collapsible" data-collapsed="true" data-theme="a" data-content-theme="c" data-inset="true"></div>');h.append("<h3>"+b+"</h3>");var p=$("<table></table>"),n=$("<tr></tr>"),o=$('<td class="layerinfo"></td>');g&&o.append($("<div>",{"class":"icon layer_preview",
+text:" "}).click(function(){zoomToBbox(k);$.mobile.changePage($("#mappage"),pageTransition)}));o.append("</br><p>"+l+"%</p>");g=$("<td></td>");g.append("<p><b>"+e+"</b></p><p>"+f+"</p>");g.append("<p><b>"+b+"</b></p><p>"+d+"</p>");n.append(o);n.append(g);p.append(n);h.append(p);b=j+"service=wms&version=1.1.1&request=GetLegendGraphic&format=image/png&layer="+c;h.append($("<br><p><b>Legende:</b></p>"));h.append($('<div class="legendcontainer" data-role="content"><img src="'+b+'"></div>'));m.append(h);
+return m}
+function FeatureResult(a,b,c,d){this.layername=a;this.position=b;this.url=c;this.html=$("<div>",{"data-sort":b});b=$('<div class="collapsible unselected" data-role="collapsible" data-collapsed="true" data-theme="a" data-content-theme="c" data-inline="true" data-inset="true"></div>');b.append("<h3>"+a+"</h3>");b.append($('<div class="legendcontainer" data-role="content"><img src="'+d+'"></div>'));a=$('<a data-role="button" data-icon="arrow-r" data-iconpos="right" target="_blank" href="'+c+'">Info</a>');
+c=$('<div class="ui-grid-a">');d=$('<div class="ui-block-a">');d.append(b);b=$('<div class="ui-block-b">');b.append(a);c.append(d);c.append(b);this.html.append(c)}var maxlayers=5,maxresults=40,baseinfo=[];searchUrl="mod_mapbender/search_proxy.php?languageCode=de&resultTarget=web&maxResults="+maxresults;
 function addmyLayer(){OpenLayers.Control.Click=OpenLayers.Class(OpenLayers.Control,{defaultHandlerOptions:{single:!0,pixelTolerance:0,stopSingle:!1},initialize:function(a){this.handlerOptions=OpenLayers.Util.applyDefaults((a||{}).handlerOptions||{},this.defaultHandlerOptions);OpenLayers.Control.prototype.initialize.apply(this,arguments);this.handler=new OpenLayers.Handler.Click(this,{click:this.onClick},this.handlerOptions)},onClick:function(a){var b=map.getLonLatFromViewPortPx(a.xy),c=$("#ownlist").find(".query_checked").parent(),
-d=$("#select-lang").val(),e=new OpenLayers.Geometry.Point(b.lon,b.lat),f=new OpenLayers.Geometry.Point(b.lon,b.lat);vector_marker.removeAllFeatures();vector_marker.addFeatures([new OpenLayers.Feature.Vector(e,{},olSearchSymbol),new OpenLayers.Feature.Vector(f,{},olFeaturequerySymbol)]);e="p"===$("#select-feature-info").val()?!0:!1;!0==e?setMarkerhint(window.lang.convert("Meldung:"),window.lang.convert("bitte warten...")):0==c.length?setMarkerhint(window.lang.convert("Meldung:"),window.lang.convert("bitte warten...")):
-($.mobile.changePage($("#featureinforesult"),pageTransition),$("#ficontentdiv").text(window.lang.convert("Bitte warten...")));0<c.length?(a=c.attr("getmapurl")+"&SERVICE=WMS&REQUEST=getFeatureInfo&VERSION=1.1.1&mapfile="+c.attr("name")+"&layers="+c.attr("name")+"&QUERY_LAYERS="+c.attr("name")+"&SRS="+featurequerySrc+"&BBOX="+map.getExtent().toBBOX()+"&WIDTH="+map.size.w+"&HEIGHT="+map.size.h+"&X="+a.xy.x+"&Y="+a.xy.y+"&INFO_FORMAT=text/html&FORMAT=image/png&STYLES=",e?(a=$('<iframe src="'+a+'" class="query_iframe"><p>Die Abfrage kann leider nicht angezeigt werden.</p></img>'),
-setMarkerhint("Abfrageergebnis:",a)):(a=$('<iframe src="'+a+'" class="query_iframe_full"><p>Die Abfrage kann leider nicht angezeigt werden.</p></img>'),$("#ficontentdiv").text(""),$("#ficontentdiv").append(a))):(a="query/rasterqueryWms.php?coord="+b.lon+", "+b.lat+"&lang="+d,loadFeature(a))},CLASS_NAME:"OpenLayers.Control.Click"});$("#mapbenderbut").click(function(){$.mobile.changePage($("#mod_mapbender"),pageTransition);refresh()});$("#mapbendersearchformbut").click(function(){searchMaps(searchUrl+
-"&searchText="+$("#mapbendersearchfield").val())});$(document).on("keypress","#mapbendersearchfield",function(a){13===a.keyCode&&searchMaps(searchUrl+"&searchText="+$("#mapbendersearchfield").val())});$(document).on("expand","div[data-role=collapsible]",function(){$("div[data-role=collapsible]").not($(this)).trigger("collapse")});$(".addToMapBut").click(function(){$("div[data-role=collapsible]").not(".ui-collapsible-collapsed").trigger("collapse");$.mobile.changePage($("#mappage"),pageTransition)});
-addBaselayers()}function preview(a,b,c){$.ajax({previewurl:a,layerid:b,bbox:c,success:function(){$("#preview").find("div[data-role=content]").empty();$("#preview").find("div[data-role=content]").append('<img src="'+$(this).attr("previewurl")+'" alt="image" style="width:200px;">');var a=$(this).attr("bbox"),b=$(this).attr("layerid");$("#preview_zoom").click(function(){getOpenlayersIndex(b);zoomToBbox(a);$.mobile.changePage($("#mappage"),pageTransition)});$("#preview").popup("open")}})}
+d=$("#select-lang").val(),e=new OpenLayers.Geometry.Point(b.lon,b.lat),f=new OpenLayers.Geometry.Point(b.lon,b.lat);vector_marker.removeAllFeatures();vector_marker.addFeatures([new OpenLayers.Feature.Vector(e,{},olSearchSymbol),new OpenLayers.Feature.Vector(f,{},olFeaturequerySymbol)]);e="p"===$("#select-feature-info").val()?!0:!1;!0==e?setMarkerhint(window.lang.convert("Meldung:"),window.lang.convert("bitte warten...")):0==c.length&&withHeight||1==c.length&&!1==withHeight?setMarkerhint(window.lang.convert("Meldung:"),
+window.lang.convert("bitte warten...")):$.mobile.changePage($("#featureinforesult"),pageTransition);$("#featurelist").empty();getHeight(b.lon,b.lat,d);if(0<c.length&&withHeight)for(b=0;b<c.length;b++){if(d=c,1<c.length&&(d=$(c[b])),0<d.find(".layer_checked").length){var f=d.attr("getmapurl")+"&SERVICE=WMS&REQUEST=getFeatureInfo&VERSION=1.1.1&mapfile="+d.attr("name")+"&layers="+d.attr("name")+"&QUERY_LAYERS="+d.attr("name")+"&SRS="+featurequerySrc+"&BBOX="+map.getExtent().toBBOX()+"&WIDTH="+map.size.w+
+"&HEIGHT="+map.size.h+"&X="+a.xy.x+"&Y="+a.xy.y+"&INFO_FORMAT=text/html&FORMAT=image/png&STYLES=&FEATURE_COUNT=100",g=d.attr("getmapurl")+"service=wms&version=1.1.1&request=GetLegendGraphic&format=image/png&layer="+d.attr("name");featureValid(new FeatureResult(d.attr("title"),layerInList($("#ownlist"),d.attr("layerid")),f,g));e?(d=$('<iframe src="'+f+'" class="query_iframe"><p>Die Abfrage kann leider nicht angezeigt werden.</p></img>'),setMarkerhint("Abfrageergebnis:",d)):(d=$('<iframe src="'+f+'" class="query_iframe_full"><p>Die Abfrage kann leider nicht angezeigt werden.</p></img>'),
+$("#ficontentdiv").text(""),$("#ficontentdiv").append(d))}}else if(1==c.length&&!1==withHeight)for(b=0;b<c.length;b++)d=c,1<c.length&&(d=$(c[b])),0<d.find(".layer_checked").length&&(f=d.attr("getmapurl")+"&SERVICE=WMS&REQUEST=getFeatureInfo&VERSION=1.1.1&mapfile="+d.attr("name")+"&layers="+d.attr("name")+"&QUERY_LAYERS="+d.attr("name")+"&SRS="+featurequerySrc+"&BBOX="+map.getExtent().toBBOX()+"&WIDTH="+map.size.w+"&HEIGHT="+map.size.h+"&X="+a.xy.x+"&Y="+a.xy.y+"&INFO_FORMAT=text/html&FORMAT=image/png&STYLES=&FEATURE_COUNT=100",
+g=d.attr("getmapurl")+"service=wms&version=1.1.1&request=GetLegendGraphic&format=image/png&layer="+d.attr("name"),featureValid(new FeatureResult(d.attr("title"),layerInList($("#ownlist"),d.attr("layerid")),f,g)),d=$('<iframe src="'+f+'" class="query_iframe"><p>Die Abfrage kann leider nicht angezeigt werden.</p></img>'),setMarkerhint("Abfrageergebnis:",d));else f="query/rasterqueryWms.php?coord="+b.lon+", "+b.lat+"&lang="+d,loadFeature(f)},CLASS_NAME:"OpenLayers.Control.Click"});$("#mapbenderbut").click(function(){$.mobile.changePage($("#mod_mapbender"),
+pageTransition);refresh()});$("#mapbendersearchformbut").click(function(){searchMaps(searchUrl+"&searchText="+$("#mapbendersearchfield").val())});$(document).on("keypress","#mapbendersearchfield",function(a){13===a.keyCode&&searchMaps(searchUrl+"&searchText="+$("#mapbendersearchfield").val())});$(document).on("expand","div[data-role=collapsible]",function(){$("div[data-role=collapsible]").not($(this)).trigger("collapse")});$(".addToMapBut").click(function(){$("div[data-role=collapsible]").not(".ui-collapsible-collapsed").trigger("collapse");
+$.mobile.changePage($("#mappage"),pageTransition)});addBaselayers()}function addFeatureCallback(a){$("#featurelist").append(a.html);refreshFeatureResults()}
+function getHeight(a,b,c){$.ajax({type:"GET",url:"query/rasterqueryWms.php?coord="+a+", "+b+"&lang="+c,success:function(a){if(a){5>a.length&&(a=window.lang.convert("Kein Ergebnis!"));var b=$("<div>"),c=$('<div class="collapsible unselected" data-role="collapsible" data-collapsed="true" data-theme="a" data-content-theme="c" data-inline="true" data-inset="true"></div>');c.append("<h3>DHM</h3>");c.append(a);b.append(c);$("#featurelist").prepend(b);refreshFeatureResults()}}})}
+function featureValid(a){$.ajax({url:"map.php",type:"POST",data:{feature_url:a.url},success:function(b){"true"==b.split("\n")[0]&&addFeatureCallback(a)}})}
+function preview(a,b,c){$.ajax({previewurl:a,layerid:b,bbox:c,success:function(){$("#preview").find("div[data-role=content]").empty();$("#preview").find("div[data-role=content]").append('<img src="'+$(this).attr("previewurl")+'" alt="image" style="width:200px;">');var a=$(this).attr("bbox"),b=$(this).attr("layerid");$("#preview_zoom").click(function(){getOpenlayersIndex(b);zoomToBbox(a);$.mobile.changePage($("#mappage"),pageTransition)});$("#preview").popup("open")}})}
 getInfo=function(a){$("#info_content").empty();$("#info_content").append(a);$("#info").popup("open")};function getOpenlayersIndex(a){for(var b=0;b<map.layers.length;b++)if(map.layers[b].name==a)return b;return-1}function addOpenlayer(a,b,c){a=new OpenLayers.Layer.WMS(a,c,{layers:b,format:"image/png",transparent:"TRUE",transitionEffect:"resize"},{projection:mapProj,units:projUnits,opacity:0.8,singleTile:!0,isBaseLayer:!1,visibility:!0,alwaysInRange:!0});map.addLayer(a);map.setLayerIndex(a,0)}
 function removeOpenlayer(a){a=getOpenlayersIndex(a);0<=a&&map.removeLayer(map.layers[a])}function setOpenBaselayer(a){a=getOpenlayersIndex(a);0<=a&&map.setBaseLayer(map.layers[a])}function selectOpenlayer(a,b){var c=getOpenlayersIndex(a);0<=c&&map.layers[c].setVisibility(b)}
 function addOpenBaselayer(a,b){$.getJSON("mod_mapbender/search_proxy.php?languageCode=de&resultTarget=web&resourceIds="+b,function(b){$.each(b.wms.srv,function(b,c){$.each(c.layer,function(b,d){d.layer&&(d=d.layer[0]);var h=new OpenLayers.Layer.WMS(a,c.getMapUrl,{layers:d.name,format:"image/png",transparent:"false",transitionEffect:"resize"},{projection:mapProj,units:projUnits,singleTile:!0,isBaseLayer:!0,alwaysInRange:!0});map.addLayers([h])})})})}
 function zoomToBbox(a){var b=a.split(","),a=(new OpenLayers.LonLat(b[0],b[1])).transform(wgs84Proj,mapProj),b=(new OpenLayers.LonLat(b[2],b[3])).transform(wgs84Proj,mapProj);map.zoomToExtent(new OpenLayers.Bounds(a.lon,a.lat,b.lon,b.lat))}function numServices(){return $("#resultlist").find(".service").length}function numResultLayers(a){return a.find(".layer").length}function layerInList(a,b){for(var c=a.find(".layer"),d=0;d<c.length;d++)if($(c[d]).attr("layerid")==b)return d;return-1}
 function up(a){var b=layerInList($("#ownlist"),a);0<b&&($($("#ownlist").find(".layer")[b]).after($($("#ownlist").find(".layer")[b-1])),console.log("todo: layerreihenfolge"),map.raiseLayer(map.layers[getOpenlayersIndex(a)],1),validateArrows(),refresh())}function numOwnlayers(){return $("#ownlist").find(".layer").length}
-function refresh(){$("#resultlist").listview("refresh");$($("#ownlist").parent()).listview("refresh");$("div[data-role=collapsible]").collapsible();$("a[data-role=button]").button()}
+function refresh(){$("#resultlist").listview("refresh");$($("#ownlist").parent()).listview("refresh");$("div[data-role=collapsible]").collapsible();$("a[data-role=button]").button()}function refreshFeatureResults(){$($("#featurelist").parent()).listview("refresh");$("div[data-role=collapsible]").collapsible();$("a[data-role=button]").button();$("#featurelist").append(getSorted($("#featurelist").children(),"data-sort"))}
+function getSorted(a,b){return $($(a).toArray().sort(function(a,d){var e=parseInt(a.getAttribute(b)),f=parseInt(d.getAttribute(b));return e-f}))}
 function validateLayers(){layers=$("#resultlist").find(".layer");$.each(layers,function(a,b){0<=layerInList($("#ownlist"),$(b).attr("layerid"))?($(b).find(".layer_icon").first().attr("class","layer_icon icon layer_remove"),$(b).find(".collapsible").first().removeClass("unselected").addClass("selected")):($(b).find(".layer_icon").first().attr("class","layer_icon icon layer_add"),$(b).find(".collapsible").first().removeClass("selected").addClass("unselected"))})}
-function validateArrows(){var a=$("#ownlist").find(".move");$(a[0]).attr("class","icon move arrow_empty");1<a.length&&$(a[1]).attr("class","icon move arrow_up")}function query_check(a){$(a).hasClass("query_unchecked")?($("#ownlist").find(".query_checked").addClass("query_unchecked").removeClass("query_checked"),$(a).addClass("query_checked").removeClass("query_unchecked")):$(a).addClass("query_unchecked").removeClass("query_checked")}
+function validateArrows(){var a=$("#ownlist").find(".move");$(a[0]).attr("class","icon move arrow_empty");1<a.length&&$(a[1]).attr("class","icon move arrow_up")}function query_check(a){$(a).hasClass("query_unchecked")?$(a).addClass("query_checked").removeClass("query_unchecked"):$(a).addClass("query_unchecked").removeClass("query_checked")}
 function addLayer(a){if(numOwnlayers()>=maxlayers)getInfo("Es können nicht mehr als "+maxlayers+" Ebenen zur Auswahl hinzugefügt werden.");else{$.mobile.showPageLoadingMsg();if(0>layerInList($("#ownlist"),$(a).attr("layerid")))return $("#ownlist").append(OwnLayer(a.attr("layerid"),a.attr("title"),a.attr("name"),a.attr("desc"),a.parent().attr("title"),a.parent().attr("desc"),a.attr("previewUrl"),"true"==a.attr("queryable"),a.attr("getMapUrl"),a.attr("bbox"),a.parent().attr("avail"))),validateLayers(),
 validateArrows(),refresh(),addOpenlayer(a.attr("layerid"),a.attr("name"),a.attr("getMapUrl")),$.mobile.hidePageLoadingMsg(),!0;$.mobile.hidePageLoadingMsg()}return!1}function removeLayer(a){layerInList($("#ownlist"),$(a).attr("layerid"));$($("#ownlist").find(".layer")[layerInList($("#ownlist"),$(a).attr("layerid"))]).remove();validateLayers();validateArrows();refresh();removeOpenlayer($(a).attr("layerid"))}
 function switchLayer(a){0>layerInList($("#ownlist"),$(a).attr("layerid"))?addLayer(a):removeLayer(a)}function addService(a){for(var a=a.find(".layer"),b=0;b<a.length&&!(addLayer($(a[b])),numOwnlayers()>maxlayers);b++);}function removeService(a){$.each(a.find(".layer"),function(a,c){removeLayer($(c))})}
 function switchVisibility(a){$(a).hasClass("layer")?($(a).find(".layer_visibility").toggleClass("layer_checked").toggleClass("layer_unchecked"),selectOpenlayer($(a).attr("layerid"),$(a).find(".layer_visibility").hasClass("layer_checked"))):($("#baselayers").find(".base_checked").addClass("base_unchecked").removeClass("base_checked"),$(a).addClass("base_checked").removeClass("base_unchecked"),setOpenBaselayer($(a).attr("layerids")))}
+function setQueryable(a,b){b?$(a).find(".query_queryable").addClass("query_checked").removeClass("query_noinfo"):$(a).find(".query_queryable").addClass("query_noinfo").removeClass("query_checked").removeClass("query_unchecked")}function setQueryCheck(a,b){b?$(a).find(".query_queryable").addClass("query_checked").removeClass("query_unchecked"):$(a).find(".query_queryable").addClass("query_unchecked").removeClass("query_checked")}
 function base_check(a){$("#baselayers").find(".base_checked").addClass("base_unchecked").removeClass("base_checked");$(a).addClass("base_checked").removeClass("base_unchecked")}
 function searchMaps(a){$.mobile.showPageLoadingMsg();$("#search_results").empty();$.getJSON(a,function(a){a=parseMapBenderJson(a);appendData(a.services,a.layers,a.nresults);$.mobile.hidePageLoadingMsg();a.nresults>maxresults&&getInfo("Es gab "+a.nresults+" Treffer, es k\u00f6nnen aber nur "+maxresults+" Ergebnisse angezeigt werden.</br><b>Schr\u00e4nken Sie Ihre Suche weiter ein.</b>")})}
-function searchWmc(a){$.mobile.showPageLoadingMsg();$("#search_results").empty();$.getJSON(a,function(a){appendWmc(a);$.mobile.hidePageLoadingMsg()})}
+function searchWmc(a){$.mobile.showPageLoadingMsg();$("#search_results").empty();$.getJSON(a,function(a){appendWmc(a);$.mobile.hidePageLoadingMsg()})}function searchLayer(a){$.mobile.showPageLoadingMsg();$("#search_results").empty();appendLayer(a);$.mobile.hidePageLoadingMsg()}
 function parseMapBenderJson(a){var b=[],c=[];$.each(a.wms.srv,function(a,e){for(var f=!1,g=0;g<b.length;g++)if(b[g].id==e.id){f=!0;break}!e.logged&&!e.nwaccess&&(f||b.push(e),$.each(e.layer,function(a,b){b.layer?$.each(b.layer,function(a,b){""!=b.name&&c.push([e.id,b])}):""!=b.name&&c.push([e.id,b])}))});return{services:b,layers:c,nresults:a.wms.md.nresults}}
 function appendData(a,b,c){$("#resultlist").empty();for(var d=0;d<a.length;d++){var e=a[d];service=Service(e.id,e.title,$(e).attr("abstract"),e.getMapUrl,e.status,""==e.logoUrl?"mod_mapbender/img/defaulicon.png":e.logoUrl,e.symbolLink,e.avail);for(var f=0;f<b.length;f++){var g=b[f],h=g[1];g[0]==e.id&&service.append(ResultLayer(h.id,h.title,h.name,$(h).attr("abstract"),h.previewURL,"1"==h.queryable,e.getMapUrl,h.bbox))}$("#resultlist").append(service)}$("#resultlist").prepend('<li data-theme="b">Suchergebnis: '+
 numServices()+" Dienste, "+numResultLayers($("#resultlist"))+" Layer ("+c+" Treffer) </li>");validateLayers();refresh()}
 function appendWmcData(a,b,c,d,e){$("#ownlist").empty();for(var f=[],g=0;g<a.length;g++)for(var h=a[g],j=0;j<b.length;j++){var k=b[j],l=k[1];k[0]==h.id&&f.push(OwnLayer(l.id,l.title,l.name,$(l).attr("abstract"),h.title,$(h).attr("abstract"),l.previewURL,"1"==l.queryable,h.getMapUrl,l.bbox,h.avail))}for(g=0;g<c.length;g++)for(j=0;j<f.length;j++)if(c[g].layerId==f[j].attr("layerid")){k=f[j];$("#ownlist").append(k);addOpenlayer(k.attr("layerid"),k.attr("name"),k.attr("getMapUrl"));c[g].active||switchVisibility(k);
-break}validateLayers();validateArrows();b=d.split(",");a=(new OpenLayers.LonLat(b[0],b[1])).transform(e,mapProj);e=(new OpenLayers.LonLat(b[2],b[3])).transform(e,mapProj);map.zoomToExtent(new OpenLayers.Bounds(a.lon,a.lat,e.lon,e.lat))}function clearOwnlist(){for(var a=$("#ownlist").find(".layer"),b=0;b<a.length;b++)removeLayer(a[b])}
+c[g].layerQueryable?(setQueryable(k,!0),setQueryCheck(k,c[g].queryLayer)):setQueryable(k,!1);break}validateLayers();validateArrows();b=d.split(",");a=(new OpenLayers.LonLat(b[0],b[1])).transform(e,mapProj);e=(new OpenLayers.LonLat(b[2],b[3])).transform(e,mapProj);map.zoomToExtent(new OpenLayers.Bounds(a.lon,a.lat,e.lon,e.lat))}
+function appendLayerData(a,b){$("#ownlist").empty();for(var c=[],d=0;d<a.length;d++)for(var e=a[d],f=0;f<b.length;f++){var g=b[f],h=g[1];g[0]==e.id&&c.push(OwnLayer(h.id,h.title,h.name,$(h).attr("abstract"),e.title,$(e).attr("abstract"),h.previewURL,"1"==h.queryable,e.getMapUrl,h.bbox,e.avail))}g=c[0];$("#ownlist").append(g);addOpenlayer(g.attr("layerid"),g.attr("name"),g.attr("getMapUrl"));"true"==g.attr("queryable")?(setQueryable(g,!0),setQueryCheck(g,!0)):setQueryable(g,!1);validateLayers();validateArrows();
+d=g.attr("bbox").split(",");c=(new OpenLayers.LonLat(d[0],d[1])).transform("EPSG:4326",mapProj);d=(new OpenLayers.LonLat(d[2],d[3])).transform("EPSG:4326",mapProj);map.zoomToExtent(new OpenLayers.Bounds(c.lon,c.lat,d.lon,d.lat))}function clearOwnlist(){for(var a=$("#ownlist").find(".layer"),b=0;b<a.length;b++)removeLayer(a[b])}
 function appendWmc(a){for(var b=0;b<a.backGroundLayer.length;b++){var c=a.backGroundLayer[b];if(c.active)for(var d=$("#baselayers").find(".baselayer"),e=0;e<d.length;e++)if($(d[e]).attr("layerids")==c.name){switchVisibility(d[e]);break}}clearOwnlist();var f="";$.each(a.layerList,function(a,b){f=f+","+b.layerId});f=f.substr(1,f.length);$.getJSON(searchUrl+"&resourceIds="+f,function(b){b=parseMapBenderJson(b);appendWmcData(b.services,b.layers,a.layerList,a.wmc.bbox,a.wmc.crs);$.mobile.hidePageLoadingMsg()})}
+function appendLayer(a){clearOwnlist();$.getJSON(searchUrl+"&resourceIds="+a,function(a){a=parseMapBenderJson(a);appendLayerData(a.services,a.layers);$.mobile.hidePageLoadingMsg()})}
 function addBaselayers(){$("#baselayers").empty();vector_marker=new OpenLayers.Layer.Vector("Vector Layer",{});gps_marker=new OpenLayers.Layer.Vector("gps_marker",{rendererOptions:{zIndexing:!0}});$("#baselayers").append(BaseLayer("RLP Zusammenstellung",atkis_praes_tms.name));$("#baselayers").append(BaseLayer("Luftbilder",luftbilder.name));$("#baselayers").append(BaseLayer("Keine Hintergrundkarte",grenze_leer.name));map.addLayers([atkis_praes_tms,luftbilder,grenze_leer,vector_marker,gps_marker]);
 for(i in baseinfo){var a=baseinfo[i][0],b=baseinfo[i][1];$("#baselayers").append(BaseLayer(a,b));addOpenBaselayer(a,b)}base_check($("#baselayers").find(".baselayer").first())}
 var initmap=function(){var a={theme:null,projection:mapProj,units:projUnits,maxExtent:mymapbounds,maxScale:mymaxscale,minScale:myminscale,numZoomLevels:myzoomlevels,scales:myscales,controls:[new OpenLayers.Control.Attribution,new OpenLayers.Control.Navigation({zoomWheelEnabled:!0}),new OpenLayers.Control.KeyboardDefaults,new OpenLayers.Control.TouchNavigation({dragPanOptions:{interval:10,enableKinetic:!0}}),new OpenLayers.Control.ScaleLine({div:document.getElementById("scaleline"),geodesic:!1,maxWidth:100,
@@ -57,12 +70,12 @@
 polygon:new OpenLayers.Control.Measure(OpenLayers.Handler.Polygon,{persist:!0,handlerOptions:{layerOptions:{styleMap:a}}})};for(var b in measureControls)a=measureControls[b],a.events.on({measure:handleMeasurements,measurepartial:handleMeasurements}),map.addControl(a)};
 $(document).ready(function(){window.location.hash&&"#mappage"!=window.location.hash&&$.mobile.changePage($("#mappage"),pageTransition);initmap();zoomSelect&&($("#zoomscale").css("visibility","visible"),createZoomselect(),map.events.register("moveend",null,displayZoom));clickCtrl=new OpenLayers.Control.Click;map.addControl(clickCtrl);clickCtrl.activate();checkLayers();$("#autolayerchange").change(function(){directLayerChange=this.value});$("#layerbut").click(function(){$.mobile.changePage($("#layerpage"),
 pageTransition)});$("#searchbut").click(function(){$.mobile.changePage($("#searchpage"),pageTransition)});$("#helpbut").click(function(){$.mobile.changePage($("#helppage"),pageTransition)});$("#gearbut").click(function(){$.mobile.changePage($("#gearpage"),pageTransition)});$("#measurelinebut").click(function(){toggleMeasure("line")});$("#measurepolybut").click(function(){toggleMeasure("polygon")});$("#ovbut").click(function(){map.zoomToExtent(map.maxExtent)});$("#zoominbut").click(function(){map.zoomIn()});
-$("#zoomoutbut").click(function(){map.zoomOut()});$("#popupMenu").popup();$("#menubut").click(function(){$("#popupMenu").popup("open")});$("#xheader").click(function(){$("#markerhint").css("visibility","hidden");vector_marker.removeAllFeatures()});$("#mheader").click(function(){$("#measurehint").css("visibility","hidden");toggleMeasure("off")});$("#searchformbut").click(function(){searchCall()});$(document).on("keypress","#searchfield",function(a){13===a.keyCode&&searchCall()});$(".mapbackbut").click(function(){$.mobile.changePage($("#mappage"),
-pageTransition);$("body").css("overflow","hidden")});$("#popupMenu").popup();$("#menubut").click(function(){$("#popupMenu").popup("open")});$("#popupMenu_gps").popup();$("#locatebut").click(function(){$("#popupMenu_gps").popup("open")});$("#gpsstatus").change(function(){"on"===this.value?startgpsWatch():stopgpsWatch()});$(".baselayer_check").click(function(){$(".baselayer_check").css("background-image","url(img/ico_basecheck.png)");$(this).css("background-image","url(img/ico_basecheck_active.png)");
-for(var a=0;a<map.layers.length;a++)$(this).attr("id")===map.layers[a].name&&map.setBaseLayer(map.layers[a]);clearanimation();checktranspage()});$(".layer_check").click(function(){for(var a=0;a<map.layers.length;a++)if($(this).attr("id")===map.layers[a].name)var b=a;map.layers[b].getVisibility()?(map.layers[b].setVisibility(!1),$(this).css("background-image","url(img/ico_check.png)")):(map.layers[b].setVisibility(!0),$(this).css("background-image","url(img/ico_check_active.png)"));clearanimation();
-checktranspage()});$(".poi_check").click(function(){var a=poilayer.params.LAYERS,b=[];""!=a&&(b=a.split(","));if(-1!=jQuery.inArray($(this).attr("id"),b)){for(a=0;a<b.length;a++)$(this).attr("id")===b[a]&&b.splice(a,1);$(this).css("background-image","url(img/ico_check.png)")}else b.push($(this).attr("id")),$(this).css("background-image","url(img/ico_check_active.png)");a=b.join(",");poilayer.mergeNewParams({layers:a});0<b.length&&poilayer.setVisibility(!0);poilayer.redraw();clearanimation();checktranspage()});
-$(".query_check").click(function(){$(".query_check").css("background-image","url(img/ico_checkop.png)");$(this).css("background-image","url(img/ico_checkop_active.png)");var a=$(this).attr("id"),a=a.substring(0,a.length-6);$("#queryselect").val(a);clearanimation()});$(".query_check").touchstart(function(){$(this).css("background-color","#808080")});$(".layer_check").touchstart(function(){$(this).css("background-color","#808080");$(this).css("color","#FFFFFF")});$(".baselayer_check").touchstart(function(){$(this).css("background-color",
-"#808080");$(this).css("color","#FFFFFF")});$(".navbuttons").touchstart(function(){$(this).css("border","2px solid #808080")});$(".navbuttons").touchend(function(){$(this).css("border","2px solid "+toolColor)});$(document).on("touchstart",".searchbutton",function(){$(this).css("border","2px solid #808080")});changeHand(defaultHand);$("#autolayerchange").val(directLayerChange);hideAddressBar()});
+$("#zoomoutbut").click(function(){map.zoomOut()});$("#xheader").click(function(){$("#markerhint").css("visibility","hidden");vector_marker.removeAllFeatures()});$("#mheader").click(function(){$("#measurehint").css("visibility","hidden");toggleMeasure("off")});$("#searchformbut").click(function(){searchCall()});$(document).on("keydown","#searchfield",function(a){13===a.keyCode&&searchCall()});$(".mapbackbut").click(function(){$.mobile.changePage($("#mappage"),pageTransition);$("body").css("overflow",
+"hidden")});$("#popupMenu").popup();$("#menubut").click(function(){$("#popupMenu").popup("open")});$("#popupMenu_gps").popup();$("#locatebut").click(function(){$("#popupMenu_gps").popup("open")});$("#gpsstatus").change(function(){"on"===this.value?startgpsWatch():stopgpsWatch()});$(".baselayer_check").click(function(){$(".baselayer_check").css("background-image","url(img/ico_basecheck.png)");$(this).css("background-image","url(img/ico_basecheck_active.png)");for(var a=0;a<map.layers.length;a++)$(this).attr("id")===
+map.layers[a].name&&map.setBaseLayer(map.layers[a]);clearanimation();checktranspage()});$(".layer_check").click(function(){for(var a=0;a<map.layers.length;a++)if($(this).attr("id")===map.layers[a].name)var b=a;map.layers[b].getVisibility()?(map.layers[b].setVisibility(!1),$(this).css("background-image","url(img/ico_check.png)")):(map.layers[b].setVisibility(!0),$(this).css("background-image","url(img/ico_check_active.png)"));clearanimation();checktranspage()});$(".poi_check").click(function(){var a=
+poilayer.params.LAYERS,b=[];""!=a&&(b=a.split(","));if(-1!=jQuery.inArray($(this).attr("id"),b)){for(a=0;a<b.length;a++)$(this).attr("id")===b[a]&&b.splice(a,1);$(this).css("background-image","url(img/ico_check.png)")}else b.push($(this).attr("id")),$(this).css("background-image","url(img/ico_check_active.png)");a=b.join(",");poilayer.mergeNewParams({layers:a});0<b.length&&poilayer.setVisibility(!0);poilayer.redraw();clearanimation();checktranspage()});$(".query_check").click(function(){$(".query_check").css("background-image",
+"url(img/ico_checkop.png)");$(this).css("background-image","url(img/ico_checkop_active.png)");var a=$(this).attr("id"),a=a.substring(0,a.length-6);$("#queryselect").val(a);clearanimation()});$(".query_check").touchstart(function(){$(this).css("background-color","#808080")});$(".layer_check").touchstart(function(){$(this).css("background-color","#808080");$(this).css("color","#FFFFFF")});$(".baselayer_check").touchstart(function(){$(this).css("background-color","#808080");$(this).css("color","#FFFFFF")});
+$(".navbuttons").touchstart(function(){$(this).css("border","2px solid #808080")});$(".navbuttons").touchend(function(){$(this).css("border","2px solid "+toolColor)});$(document).on("touchstart",".searchbutton",function(){$(this).css("border","2px solid #808080")});changeHand(defaultHand);$("#autolayerchange").val(directLayerChange);hideAddressBar()});
 var clearanimation=function(){$(".query_check").css("background-color","#808080");$(".layer_check, .baselayer_check, .poi_check").css("background-color","#FFFFFF");$(".layer_check, .baselayer_check, .poi_check").css("color","#000000")},checktranspage=function(){"on"===directLayerChange&&$.mobile.changePage($("#mappage"),pageTransition)},checkLayers=function(){$(".baselayer_check").each(function(){for(var a=0;a<map.layers.length;a++)map.layers[a].name===$(this).attr("id")&&map.layers[a].visibility&&
 $(this).css("background-image","url(img/ico_basecheck_active.png)")});$(".layer_check").each(function(){for(var a=0;a<map.layers.length;a++)map.layers[a].name===$(this).attr("id")&&map.layers[a].visibility&&$(this).css("background-image","url(img/ico_check_active.png)")});$(".poi_check").each(function(){var a=poilayer.params.LAYERS,b=[];""!=a&&(b=a.split(","));-1!=jQuery.inArray($(this).attr("id"),b)&&$(this).css("background-image","url(img/ico_check.png)")});$(".query_check").each(function(){var a=
 $(this).attr("id");a.substring(0,a.length-6)===$("#queryselect").val()&&$(this).css("background-image","url(img/ico_checkop_active.png)")})};function searchCall(){"google"===searchMode?codeAddress():"streetsearch"===searchMode?searchStreet($("#searchfield").val()):"mapbendersearch"===searchMode?searchMapbender($("#searchfield").val()):alert("kein Suchmodus konfiguriert!")}function setMarkerhint(a,b){$("#xheader").html(a);$("#xcontent").html(b);$("#markerhint").css("visibility","visible")}

Modified: trunk/mapbender/http/extensions/mobilemap/map.php
===================================================================
--- trunk/mapbender/http/extensions/mobilemap/map.php	2017-04-11 13:56:39 UTC (rev 9733)
+++ trunk/mapbender/http/extensions/mobilemap/map.php	2017-05-05 10:46:18 UTC (rev 9734)
@@ -3,8 +3,8 @@
 require_once(dirname(__FILE__)."/../../../conf/mobilemap.conf");
 require_once(dirname(__FILE__)."/../../classes/class_connector.php");
 require_once(dirname(__FILE__)."/../../classes/class_administration.php");
-
 $admin = new administration();
+$withHeight = 'true';
 //Fixes IPhone, Android 2.x 
 if(strstr($_SERVER['HTTP_USER_AGENT'], 'iPhone') || strstr($_SERVER['HTTP_USER_AGENT'], 'iPod') || strstr($_SERVER['HTTP_USER_AGENT'], 'Android 2.')) {
  $scaleselect = "false";
@@ -19,6 +19,21 @@
 		$admin->logClientUsage($_SERVER['HTTP_REFERER'], $wmcid, 2);
 	}
 }
+//Parameter zur Deaktivierung der Höhenabfrage
+if (isset($_REQUEST["withHeight"]) & $_REQUEST["withHeight"] != "") {
+	//validate true 
+	$testMatch = $_REQUEST["withHeight"];	
+ 	if (!($testMatch == '1' or $testMatch == '0')){ 
+		echo 'Parameter <b>withHeight</b> is not valid (1,0).<br/>'; 
+		die(); 		
+ 	}
+	if ($testMatch == '0') {
+		$withHeight = 'false';
+	} else {
+		$withHeight = 'true';
+	}
+	$testMatch = NULL;
+}
 //LayerId Anfrage Mapbendermodul
 if (isset($_GET['layerid'])) {
 	$layerid = htmlspecialchars($_GET["layerid"]);
@@ -116,6 +131,9 @@
 <?php if($devmode){ ?>
 <script src="../mobilemap/js/dev/1_ngms_olextent.js" ></script>
 <script src="../mobilemap/js/dev/2_ngms_global.js" ></script>
+<script type="text/javascript">
+	var withHeight = <?php echo $withHeight; ?>;
+</script>
 <?php if($mapbendermod){ ?>
 <!-- Mod Mapbender -->
 <script src="../mobilemap/mod_mapbender/searchobjects.js"></script>
@@ -135,13 +153,13 @@
 		window.lang.run();
 		changeLanguage('<?php echo $mylang; ?>',false);
 		<?php if($wmcid != ''){ ?>
-		var wmcurl = '<?php echo $mapbender_wmcurl.$wmcid; ?>';
-		//add user defined bbox values if given
-		<?php if(isset($mb_myBBOX) && isset($mb_myBBOXEpsg)){ ?>
-			var wmcurl = wmcurl+"&mb_myBBOX="+<?php echo "'".$mb_myBBOX."'"; ?>+"&mb_myBBOXEpsg="+<?php echo "'".$mb_myBBOXEpsg."'"; ?>;
+			var wmcurl = '<?php echo $mapbender_wmcurl.$wmcid; ?>';
+			//add user defined bbox values if given
+			<?php if(isset($mb_myBBOX) && isset($mb_myBBOXEpsg)){ ?>
+				var wmcurl = wmcurl+"&mb_myBBOX="+<?php echo "'".$mb_myBBOX."'"; ?>+"&mb_myBBOXEpsg="+<?php echo "'".$mb_myBBOXEpsg."'"; ?>;
+			<?php } ?>
+			searchWmc(wmcurl);
 		<?php } ?>
-		searchWmc(wmcurl);
-		<?php } ?>
 		//new for layerid
 		<?php if($layerid != ''){ ?>
 		var layerurl = '<?php echo str_replace("wmcid","layerid",$mapbender_wmcurl).$layerid; ?>';

Modified: trunk/mapbender/http/extensions/mobilemap/mod_mapbender/search.js
===================================================================
--- trunk/mapbender/http/extensions/mobilemap/mod_mapbender/search.js	2017-04-11 13:56:39 UTC (rev 9733)
+++ trunk/mapbender/http/extensions/mobilemap/mod_mapbender/search.js	2017-05-05 10:46:18 UTC (rev 9734)
@@ -72,6 +72,9 @@
 				new OpenLayers.Feature.Vector(geompoint,{},olSearchSymbol),
 				new OpenLayers.Feature.Vector(geompoint1,{},olFeaturequerySymbol)
 			]);
+ 			/*if (withHeight) {
+				alert("withHeight is true");
+			}*/
 			if ($("#select-feature-info").val() === 'p') {
 				var fiPopUp = true; 
 			} else {
@@ -81,7 +84,7 @@
 			if (fiPopUp == true ) {
 				setMarkerhint(window.lang.convert('Meldung:'),window.lang.convert('bitte warten...'));
 			} else {
-				if (querylayer.length == 0) {
+				if ((querylayer.length == 0 && withHeight) || (querylayer.length == 1 && withHeight == false)) {
 					//featureInfo on dhm
 					setMarkerhint(window.lang.convert('Meldung:'),window.lang.convert('bitte warten...'));
 				} else {
@@ -92,9 +95,9 @@
 			//SP: Reset Feature List
 			$("#featurelist").empty();
 			//SP: DHM Höhe in Ergebnisliste
-			getHeight(lonlat.lon, lonlat.lat, actuallang);
+			getHeight(lonlat.lon, lonlat.lat, actuallang);					
 			// Query Layer
-	 		if(querylayer.length > 0) {
+	 		if(querylayer.length > 0 && withHeight) {
 				//SP: alle queryable layers iterieren
 				for (var i = 0; i < querylayer.length; i++) {
 					//SP: bei nur einem Feature direkte Referenz, ansonsten array
@@ -146,10 +149,51 @@
 					} //end if layer checked	
 				} //end for
 			} else {
-			// Standardabfrage, falls keiner ausgewählt ist
-			//d.h. dhm!
-			var featureurl = 'query/rasterqueryWms.php?coord='+lonlat.lon+ ', '+lonlat.lat+'&lang='+actuallang;
-			loadFeature(featureurl);	
+				if (querylayer.length == 1 && withHeight == false) {
+					//SP: alle queryable layers iterieren
+					for (var i = 0; i < querylayer.length; i++) {
+						//SP: bei nur einem Feature direkte Referenz, ansonsten array
+						var ql = querylayer;
+						if (querylayer.length > 1) ql = $(querylayer[i]);
+						//SP: check layer visible
+						if (ql.find('.layer_checked').length > 0) {
+							// Abfrage des ausgewählten Layers
+							//if abfrage ob ? vorkommt dann & sonst Fragezeichen
+							var featureurl = ql.attr('getmapurl')
+									+ '&SERVICE=WMS&REQUEST=getFeatureInfo&VERSION=1.1.1'
+									+ '&mapfile='+ ql.attr('name')
+									+ '&layers=' + ql.attr('name') + '&QUERY_LAYERS=' + ql.attr('name')
+									+ '&SRS=' + featurequerySrc 
+									+ '&BBOX=' + map.getExtent().toBBOX()
+									+ '&WIDTH=' + map.size.w + '&HEIGHT=' + map.size.h
+									+ '&X=' + evt.xy.x + '&Y=' + evt.xy.y
+									+ '&INFO_FORMAT=text/html' 
+									+ '&FORMAT=image/png' //only for some wms that have problems if this parameter is not given
+									+ '&STYLES=' //only for some wms that have problems if this parameter is not given
+									+ '&FEATURE_COUNT=100';
+
+							// Legende für Feature Info
+							var legendurl = ql.attr('getmapurl')
+									+ 'service=wms&version=1.1.1'
+									+ '&request=GetLegendGraphic'
+									+ '&format=image/png'
+									+ '&layer=' + ql.attr('name');
+						
+							//SP: check empty feature result!
+							featureValid(new FeatureResult(ql.attr('title'), layerInList($('#ownlist'), ql.attr('layerid')), featureurl, legendurl));
+							var iframe=$('<iframe src="'+featureurl+'" class="query_iframe">'
+								+'<p>Die Abfrage kann leider nicht angezeigt werden.</p></img>'
+							);
+							setMarkerhint('Abfrageergebnis:',iframe);
+							//loadFeature(featureurl);
+						} //end if layer checked	
+					} //end for
+				} else {
+					// Standardabfrage, falls keiner ausgewählt ist
+					//d.h. dhm!
+					var featureurl = 'query/rasterqueryWms.php?coord='+lonlat.lon+ ', '+lonlat.lat+'&lang='+actuallang;
+					loadFeature(featureurl);
+				}	
 		}
 	 },
 



More information about the Mapbender_commits mailing list