<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:10pt"><div id="yiv318353037"><div style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-family: arial,helvetica,sans-serif; font-size: 10pt;"><div><span>Matt,</span></div>
<div><br>
  <span></span></div>
<div><span>Thanks for your reply.</span></div>
<div><br>
  <span></span></div>
<div><span>Rich,</span></div>
<div><br>
  <span></span></div>
<div><span>Thanks for posting you idea. Since we do not have a complete client side solution at this moment, may be your idea could be the only way out.</span></div>
<div><br>
  <span></span></div>
<div><span>-Ravi.</span></div><div><br id="yiv318353037yui_3_2_0_2_130832004227051"></div><div class="yiv318353037yui_3_2_0_2_130832004227052" id="yiv318353037yui_3_2_0_2_130832004227054" style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"><div id="yiv318353037yui_3_2_0_2_1308320042270112" class="yiv318353037yui_3_2_0_2_130832004227057" style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><font face="Arial" size="2"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> Richard Greenwood &lt;richard.greenwood@gmail.com&gt;<br><b><span style="font-weight: bold;">To:</span></b> maw269 &lt;maw269@gmail.com&gt;<br><b><span style="font-weight: bold;">Cc:</span></b> users@openlayers.org<br><b><span style="font-weight: bold;">Sent:</span></b> Thursday, June 16, 2011 7:16 PM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [OpenLayers-Users] Re: OL w/ JQuery Mobile - WMSGetFeatureInfo<br></font><br>
On Thu, Jun 16, 2011 at 5:04 PM, maw269 &lt;<a rel="nofollow" ymailto="mailto:maw269@gmail.com" target="_blank" href="mailto:maw269@gmail.com">maw269@gmail.com</a>&gt; wrote:<br>&gt; Nope Ravi, I have not found a solution.<br>&gt;<br>&gt; Sorry,<br>&gt;<br>&gt; Matt<br><br>I don't know if the code below will help. I am putting the results<br>into a jQuery 'page' rather than a pop-up, and I am querying the<br>attribute data via a custom php page that returns JSON, but maybe it<br>will be useful to you none the less.<br><br>Best regards,<br>Rich<br><br>OpenLayers.Control.Click = OpenLayers.Class(OpenLayers.Control, {<br>&nbsp; defaultHandlerOptions: {<br>&nbsp;&nbsp;&nbsp; &nbsp; 'single': true,<br>&nbsp;&nbsp;&nbsp; &nbsp; 'double': false,<br>&nbsp;&nbsp;&nbsp; &nbsp; 'pixelTolerance': 0,<br>&nbsp;&nbsp;&nbsp; &nbsp; 'stopSingle': false,<br>&nbsp;&nbsp;&nbsp; &nbsp; 'stopDouble': false<br>&nbsp; },<br><br>&nbsp; initialize: function(options)
 {<br>&nbsp;&nbsp;&nbsp; &nbsp;
 this.handlerOptions = OpenLayers.Util.extend(<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; {}, this.defaultHandlerOptions<br>&nbsp;&nbsp;&nbsp; &nbsp; );<br>&nbsp;&nbsp;&nbsp; &nbsp; OpenLayers.Control.prototype.initialize.apply(<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; this, arguments<br>&nbsp;&nbsp;&nbsp; &nbsp; );<br>&nbsp;&nbsp;&nbsp; &nbsp; this.handler = new OpenLayers.Handler.Click(<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; this, {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; 'click': this.trigger<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; }, this.handlerOptions<br>&nbsp;&nbsp;&nbsp; &nbsp; );<br>&nbsp; },<br><br>&nbsp; trigger: function(e) {<br>&nbsp; &nbsp; var url;<br><br>&nbsp; &nbsp; // var qlayers = rwg.mapservLayerList.getActiveInfoLayers();<br>&nbsp; &nbsp; var qlayers = 'ownership';<br><br>&nbsp; &nbsp; if (qlayers) {<br>&nbsp; &nbsp; &nbsp; /* Populate Info Tool via jQuery JSON */<br>&nbsp;
 &nbsp; &nbsp; url = rwg.info_url + '?layers=' + qlayers;<br>&nbsp; &nbsp; &nbsp; url += '&amp;r='+Math.round(map.getResolution()); // resolution in<br>feet per pixel<br><br>&nbsp; &nbsp; &nbsp; var p0 = this.map.getLonLatFromViewPortPx(e.xy);<br>&nbsp; &nbsp; &nbsp; url += "&amp;p="+Math.round(p0.lon)+','+Math.round(p0.lat);<br><br>&nbsp; &nbsp; &nbsp; $('#infotool').empty();<br>&nbsp; &nbsp; &nbsp; $('#infotool').append(rwg.renderInfo(url));<br><br>&nbsp; &nbsp; &nbsp; $.mobile.changePage('infopage');<br>&nbsp; &nbsp; }<br>&nbsp; }<br>});<br><br>rwg.renderInfo = function(url){<br>&nbsp; var content = $('&lt;div&gt;');<br>&nbsp; // content.hide();<br>&nbsp; // in jQuery 1.4 $.getJSON() will fail silently on invalid JSON data<br>&nbsp; $.getJSON(url, function(data) {<br>&nbsp; &nbsp; // content.append('&lt;b&gt;' + data.numRows + ' Record(s) Found&lt;/b&gt;');<br>&nbsp; &nbsp; var infoLength = <a rel="nofollow" target="_blank"
 href="http://data.info">data.info</a>.length;<br><br>&nbsp; &nbsp; // loop thru the unique info layers<br>&nbsp; &nbsp; // a single layer can return multiple records<br>&nbsp; &nbsp; for (var i=0; i&lt;infoLength; i++) {<br>&nbsp; &nbsp; &nbsp; // content.append('&lt;hr&gt;');<br>&nbsp; &nbsp; &nbsp; // Check to see if we have a function registered to display<br>records of this info type.<br>&nbsp; &nbsp; &nbsp; if (typeof(rwg.infoLayers[data.info[i].handler]) === 'function') {<br>&nbsp; &nbsp; &nbsp; &nbsp; content.append(rwg.infoLayers[data.info[i].handler](data.info[i].records));<br>&nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; }<br>&nbsp; });<br>&nbsp; return content;<br>}<br><br><br><br>-- <br>Richard Greenwood<br><a rel="nofollow" ymailto="mailto:richard.greenwood@gmail.com" target="_blank" href="mailto:richard.greenwood@gmail.com">richard.greenwood@gmail.com</a><br><a rel="nofollow" target="_blank"
 href="http://www.greenwoodmap.com">www.greenwoodmap.com</a><br>_______________________________________________<br>Users mailing list<br><a rel="nofollow" ymailto="mailto:Users@lists.osgeo.org" target="_blank" href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a><br>http://lists.osgeo.org/mailman/listinfo/openlayers-users<br><br><br></div></div></div></div></div></body></html>