[OpenLayers-Users] OL w/ JQuery Mobile - WMSGetFeatureInfo

maw269 maw269 at gmail.com
Tue Apr 19 12:33:59 EDT 2011


Hello,
The OL mobile code sprint cranked out some awesome results! I've been able
to successfully utilize the OL w/ JQuery Mobile example
(http://www.openlayers.org/dev/examples/mobile-jq.html). It is soo smooth.
Now I am trying to port my WMSGetFeatureInfo and popup code to my mobile
page. Can someone please help me to do this? I want to be able to touch WMS
features and get their attributes in a popup.
My current popup/wmsfeature code (from my desktop version) looks like this:

// Begin: Add Popups with getFeatureInfo info :-)
var maximumSize = new OpenLayers.Size(200, 200);

var myPopupClass = new OpenLayers.Class
(
	OpenLayers.Popup.FramedCloud,
	{
		'autoSize': true,
		'maxSize': new OpenLayers.Size(500,500)
	}		
);				

var info = new OpenLayers.Control.WMSGetFeatureInfo
({
	url: 'http://mydomain.com/geoserver/wms', 
	layerUrls: [('http://mydomain.com/geoserver/gwc/service/wms')],
	layers: [dncObs, dncNav, dncPlaces, dncSoundings],							
	queryVisible: true,						
	eventListeners: 
	{							
		getfeatureinfo: function(event) 
		{									
			if (event.text.search("Type") != -1)
			{									
				var myPopup = new myPopupClass
				(
					"chicken", 										
					map.getLonLatFromPixel(event.xy),
					null,
					event.text,
					null,
					true
				);
				map.addPopup(myPopup);								
			}								
		}
	}
});
map.addControl(info);
info.activate();
// End: Add Popup


How do I make this work in the JQuery Mobile version?

Thanks!
Matt

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/OL-w-JQuery-Mobile-WMSGetFeatureInfo-tp6287908p6287908.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.


More information about the Users mailing list