[mapserver-users] RE: Problem TEMPLATE to use getfeatureinfo.html

Richard LEHAUT richard.lehaut at crpf.fr
Wed Nov 19 07:29:14 EST 2008


It thank you I see the following result.

GetFeatureInfo results:
Layer 'dgd'
  Feature 1244:
    gid = '1244'
    dgd_proid = '5403'
    dgd_forid = '927'
    dgd_prox = '517709.862932534771971'
    dgd_proy = '2461383.926690207794309'
    dgd_prosur = '168.065898751962663'
...

I joined the Mapfile amended to conclude the matter.
The side that gives this openlayers
    map.events.register('click', map, function (e) {
        OpenLayers.Util.getElement('nodeList').innerHTML = "Loading... 
please wait...";
        var url =  ccDGD.getFullRequestString({
            REQUEST: "GetFeatureInfo",
            EXCEPTIONS: "application/vnd.ogc.se_xml",
            BBOX: ccDGD.map.getExtent().toBBOX(),
            X: e.xy.x,
            Y: e.xy.y,
            INFO_FORMAT: 'text/plain',
            QUERY_LAYERS: ccDGD.params.LAYERS,
            WIDTH: ccDGD.map.size.w,
            HEIGHT: ccDGD.map.size.h});
        OpenLayers.loadURL(url, '', this, setHTML);
        OpenLayers.Event.stop(e);
        });


Thomas thank you for help


----- Original Message ----- 
From: "Thomas Ellett" <Thomas.Ellett at statkart.no>
To: "Richard LEHAUT" <richard.lehaut at crpf.fr>
Sent: Wednesday, November 19, 2008 11:40 AM
Subject: RE: Problem TEMPLATE to use getfeatureinfo.html


Ok, I've changed a couple of things in the mapfile and you need to add a
Couple of variables as well. I've added the code on lines 34 and 35, you can
Just leave that. On line 58 you need to add a port (you can find this by 
clicking on the properties of the db in postgis). On line 59, you just need 
to add the name of the unique identifier column from your table, possibly 
ogc_fid? I've also commented out the bottom 2 layers, its probably easier to 
concentrate on 1 layer at a time. Because you have referenced a blank html 
(ttt.html) you need to set the info_format in the getfeatureinfo url to 
text/plain or text/gml. This mapfile should be correct, but you can make 
sure I haven't made a typo by looking at the capabilities document. Let me 
know how it goes,

Cheers

Tom

-----Original Message-----
From: Richard LEHAUT [mailto:richard.lehaut at crpf.fr]
Sent: Wednesday, November 19, 2008 11:16 AM
To: Thomas Ellett
Subject: Re: Problem TEMPLATE to use getfeatureinfo.html

Thank's
Tio
----- Original Message ----- 
From: <thomas.ellett at statkart.no>
To: <richard.lehaut at crpf.fr>
Sent: Wednesday, November 19, 2008 11:00 AM
Subject: Problem TEMPLATE to use getfeatureinfo.html


>
> Hey Tio, not sure what you mean by 'tried to put a format model'?
> If you want to send me a copy of your mapfile I can take a look at
> that to see if theres anything wrong there, I can't really help with
> openlayers client side script though as I'm not much of a programmer
> I'm afraid.
>
> Cheers
>
> Tom
>
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: WEBSIG_NORM.map
Type: application/octet-stream
Size: 2328 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/mapserver-users/attachments/20081119/5d54e339/WEBSIG_NORM.obj


More information about the mapserver-users mailing list