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

Ravi Pavuluri ravitheja at ymail.com
Thu Jun 16 18:00:38 EDT 2011


Hi Matt,

Were you able to make it work finally? I am trying a similar approach and with no success.

Is anyone else able to make it work with SenchaTouch/JQM?

Thanks,
Ravi.




________________________________
From: maw269 <maw269 at gmail.com>
To: users at openlayers.org
Sent: Tuesday, April 19, 2011 12:33 PM
Subject: [OpenLayers-Users] OL w/ JQuery Mobile - WMSGetFeatureInfo

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.
_______________________________________________
Users mailing list
Users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/openlayers-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20110616/c895d98a/attachment-0001.html


More information about the Users mailing list