[OpenLayers-Users] Using GetFeatureInfo on MapGuide layers via WMS

gingerbbm stuart.jones at jacobs.com
Wed Nov 5 12:16:57 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 following code to do this job.

    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
        });
        OpenLayers.loadURL(url, '', this, setHTML);
        OpenLayers.Event.stop(e);
      });

It seems to work for area features, but not point or line features. I have
no idea why.

I would appreciate any advice on this subject.

Thanks!
Stuart

P.S. I'm using WMS despite the existence of a MapGuide class because:
a) I couldn't get it working, and
b) it seems a bit heavy having to generate an individual image for each of
my overlay layers

Any thoughts on this would be gratefully received too!
-- 
View this message in context: http://n2.nabble.com/Using-GetFeatureInfo-on-MapGuide-layers-via-WMS-tp1460930p1460930.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.




More information about the Users mailing list