<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 <richard.greenwood@gmail.com><br><b><span style="font-weight: bold;">To:</span></b> maw269 <maw269@gmail.com><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 <<a rel="nofollow" ymailto="mailto:maw269@gmail.com" target="_blank" href="mailto:maw269@gmail.com">maw269@gmail.com</a>> wrote:<br>> Nope Ravi, I have not found a solution.<br>><br>> Sorry,<br>><br>> 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> defaultHandlerOptions: {<br> 'single': true,<br> 'double': false,<br> 'pixelTolerance': 0,<br> 'stopSingle': false,<br> 'stopDouble': false<br> },<br><br> initialize: function(options)
{<br>
this.handlerOptions = OpenLayers.Util.extend(<br> {}, this.defaultHandlerOptions<br> );<br> OpenLayers.Control.prototype.initialize.apply(<br> this, arguments<br> );<br> this.handler = new OpenLayers.Handler.Click(<br> this, {<br> 'click': this.trigger<br> }, this.handlerOptions<br> );<br> },<br><br> trigger: function(e) {<br> var url;<br><br> // var qlayers = rwg.mapservLayerList.getActiveInfoLayers();<br> var qlayers = 'ownership';<br><br> if (qlayers) {<br> /* Populate Info Tool via jQuery JSON */<br>
url = rwg.info_url + '?layers=' + qlayers;<br> url += '&r='+Math.round(map.getResolution()); // resolution in<br>feet per pixel<br><br> var p0 = this.map.getLonLatFromViewPortPx(e.xy);<br> url += "&p="+Math.round(p0.lon)+','+Math.round(p0.lat);<br><br> $('#infotool').empty();<br> $('#infotool').append(rwg.renderInfo(url));<br><br> $.mobile.changePage('infopage');<br> }<br> }<br>});<br><br>rwg.renderInfo = function(url){<br> var content = $('<div>');<br> // content.hide();<br> // in jQuery 1.4 $.getJSON() will fail silently on invalid JSON data<br> $.getJSON(url, function(data) {<br> // content.append('<b>' + data.numRows + ' Record(s) Found</b>');<br> var infoLength = <a rel="nofollow" target="_blank"
href="http://data.info">data.info</a>.length;<br><br> // loop thru the unique info layers<br> // a single layer can return multiple records<br> for (var i=0; i<infoLength; i++) {<br> // content.append('<hr>');<br> // Check to see if we have a function registered to display<br>records of this info type.<br> if (typeof(rwg.infoLayers[data.info[i].handler]) === 'function') {<br> content.append(rwg.infoLayers[data.info[i].handler](data.info[i].records));<br> }<br> }<br> });<br> 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>