[mapguide-users] Using GetFeatureInfo on MapGuide layers via WMS

gingerbbm stuart.jones at jacobs.com
Wed Nov 5 13:22:21 EST 2008


Dear all

I am accessing MapGuide layers via WMS (in OpenLayers). I want to be able to
click a point and see feature information (ultimately to create dynamic
tooltips). I found the code to do this job (see below) which employs
GetFeatureInfo.

The thing is, it doesn't appear to work on point or line layers, only
polygon ones. Can anyone confirm that this doesn't work, or offer some
advice on how to make it work.

    map.events.register('click', map, function (e) {
        OpenLayers.Util.getElement('nodeList').innerHTML = "Loading...
please wait...";
        var url =  layerTube.getFullRequestString({
            REQUEST: "GetFeatureInfo",
            EXCEPTIONS: "application/vnd.ogc.se_xml",
            BBOX: layerTube.map.getExtent().toBBOX(),
            X: e.xy.x,
            Y: e.xy.y,
            INFO_FORMAT: 'text/html',
            QUERY_LAYERS: layerTube.params.LAYERS,
            WIDTH: layerTube.map.size.w,
            HEIGHT: layerTube.map.size.h,
            TOLERANCE: 50
        });
        OpenLayers.loadURL(url, '', this, setHTML);
        OpenLayers.Event.stop(e);
      }); 


I would appreciate any advice on this subject.

Thanks!
Stuart
-- 
View this message in context: http://n2.nabble.com/Using-GetFeatureInfo-on-MapGuide-layers-via-WMS-tp1461258p1461258.html
Sent from the MapGuide Users mailing list archive at Nabble.com.



More information about the mapguide-users mailing list