[mapserver-users] Re: WMSGetFeatureInfo problem (No results, using OL)
stela anders
stelaanders at gmail.com
Wed Jan 27 06:59:46 PST 2010
Steve, _test is a javascript variable:
var _test = new OpenLayers.Layer.WMS("MyLayer",
_mapfilex, {
layers: [ 'Test1,Test2'],
format: "image/png",
transparent: "true"
}, {
isBaseLayer: false,
buffer: 0,
visibility: true
});
Stella
2010/1/27 <Steve.Toutant at inspq.qc.ca>
>
> Stela,
> In that example you are querying layers Test1 and Test2.
> Below you defined your control with layer _test
> It is confusing...
> You should try with a simpler example. I suggest you create a mapfile with
> one layer (don't forget the tolerance and template), create the wms layer in
> Openlayer and define the control on this layer only.
> Steve
>
>
> *Steve Toutant, M. Sc.*
> Analyste en géomatique
> Secteur environnement
> Direction de la santé environnementale et de la toxicologie
> Institut national de santé publique du Québec
> 945, avenue Wolfe
> Québec, Qc G1V 5B3
>
> Tél.: (418) 650-5115 #5281
> Fax.: (418) 654-3144*
> **steve.toutant at inspq.qc.ca* <steve.toutant at inspq.qc.ca>*
> **http://www.inspq.qc.ca* <http://www.inspq.qc.ca/>
>
>
>
>
>
>
> *stela anders <stelaanders at gmail.com>@lists.osgeo.org*
> Envoyé par : mapserver-users-bounces at lists.osgeo.org
>
> 27/01/2010 08:35 AM
> A
> "Fawcett, David (MPCA)" <David.Fawcett at state.mn.us>
> cc
> MapserverList OSGEO <mapserver-users at lists.osgeo.org>
> Objet
> Re: [mapserver-users] Re: WMSGetFeatureInfo problem (No results,
> using OL)
>
>
>
>
>
>
> Hi David!
>
> The url is :
> *
> **
> http://localhost/cgi-bin/mapserv.exe?map=map.map&&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&LAYERS=Test1,Test2&QUERY_LAYERS=Test1,Test2&STYLES=,&BBOX=-65.806807%2C-16.885911%2C-38.978193%2C-11.238939&FEATURE_COUNT=10&HEIGHT=257&WIDTH=1221&FORMAT=image%2Fpng&INFO_FORMAT=text%2Fhtml&SRS=EPSG%3A4326&X=366&Y=217
> *<http://localhost/cgi-bin/mapserv.exe?map=map.map&&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&LAYERS=Test1,Test2&QUERY_LAYERS=Test1,Test2&STYLES=,&BBOX=-65.806807%2C-16.885911%2C-38.978193%2C-11.238939&FEATURE_COUNT=10&HEIGHT=257&WIDTH=1221&FORMAT=image%2Fpng&INFO_FORMAT=text%2Fhtml&SRS=EPSG%3A4326&X=366&Y=217>
>
> Executing that URL direct in browser generate that:
>
> Content-type: application/vnd.ogc.se_xml
>
> Thanks
>
> Stella
>
> 2010/1/26 Fawcett, David (MPCA) <*David.Fawcett at state.mn.us*<David.Fawcett at state.mn.us>
> >
> Stella,
>
>
>
> What does the getFeatureInfo call look like?
>
>
>
> Use Firebug to find the URL used to make the request and post it here.’
>
>
>
> David.
>
>
>
> *From:* *mapserver-users-bounces at lists.osgeo.org*<mapserver-users-bounces at lists.osgeo.org>[mailto:
> *mapserver-users-bounces at lists.osgeo.org*<mapserver-users-bounces at lists.osgeo.org>]
> *On Behalf Of *stela anders*
> Sent:* Tuesday, January 26, 2010 1:33 PM*
> To:* MapserverList OSGEO*
> Subject:* [mapserver-users] Re: WMSGetFeatureInfo problem (No results,
> using OL)
>
>
>
> Any idea whats happening?
> I lost all day trying to fix that, but got nothing :(
>
> Stella
>
> 2010/1/25 stela anders <*stelaanders at gmail.com* <stelaanders at gmail.com>>
>
> Hello guys...
>
> My mapfile:
>
> ...
> PROJECTION
> "+init=epsg:4326"
> END
>
> WEB
> IMAGEPATH 'C:\temp\'
> IMAGEURL '/tmp/'
> QUERYFORMAT text/html
>
> METADATA
> "wms_title" "WMS Server"
> "wms_onlineresource" "*http://localhost/cgi-bin/mapserv.exe*<http://localhost/cgi-bin/mapserv.exe>?"
>
> "wms_srs" "EPSG:4326 EPSG:42304 EPSG:42101 EPSG:4269"
> 'wms_feature_info_mime_type' "text/html"
> END
> END
>
> QUERYMAP
> COLOR 255 0 0
> SIZE -1 -1
> STATUS OFF
> STYLE hilite
> END
> ...
>
> LAYER
> ...
> METADATA
> "wms_title" "Test" ##required
> "wms_include_items" "all"
> "wms_feature_info_mime_type" "text/html"
> END
> TYPE POINT
> STATUS ON
> INCLUDE "Connection.map"
> DATA "the_geom from viwtest USING UNIQUE oid USING SRID=0"
> PROJECTION
> "+init=epsg:4326"
> END
>
> TOLERANCE 5
> HEADER "header.html"
> TEMPLATE "template.html"
> FOOTER "footer.html"
> ...
>
> Templates:
> Header.html
> <!-- MapServer Template -->
> <html>
> <head>
> <title>MapServer Template Sample</title>
> </head>
>
> Template.html
> <!-- MapServer Template -->
> <body>
> <b>OID:</b> [oid]
> </body>
>
> Footer.html
> </html>
>
> WMSGetFeatureInfo Javascript (OpenLayer)
>
> var infoCtl = new OpenLayers.Control.WMSGetFeatureInfo({
> layers: [_test],
> title: 'Click on the map to get information on layers',
>
> queryVisible: true,
> infoFormat: 'text/html'
> });
>
> infoCtl.events.register("getfeatureinfo",map,showInfo);
>
> function showInfo(evt) {
> alert(evt.text);
> }
>
>
> I´m getting that :
>
> <html>
> <head>
> <title>MapServer Template Sample</title>
> </head> Content-type: application/vnd.ogc.se_xml
>
> <?xml version='1.0' encoding="ISO-8859-1" standalone="no" ?>
> <!DOCTYPE ServiceExceptionReport SYSTEM "*
> http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd*<http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd>
> ">
> <ServiceExceptionReport version="1.1.1">
> <ServiceException>
> </ServiceException>
> </ServiceExceptionReport>
>
>
> Any idea whats happening?
>
> Stella
>
>
>
> _______________________________________________
>
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20100127/be6620e8/attachment.htm>
More information about the MapServer-users
mailing list