[mapserver-users] WMSGetFeatureInfo problems with OpenLayers
    Rahkonen Jukka 
    Jukka.Rahkonen at mmmtike.fi
       
    Sat Nov 21 08:00:21 PST 2009
    
    
  
Hi,
I would have a try by using absolute paths to templates. For me it is often hard to understand what is the starting point for relative paths.
-Jukka Rahkonen-
Stephen Woodbridge wrote:
 
Hi all,
I have been struggling with this problem all afternoon, so it is time to 
ask for some more help. I have made some progress with Daniel M. help on 
the OpenLayers list, but I'm not sure where the problem lies.
The problem:
I'm trying to replicates:
http://dev.openlayers.org/releases/OpenLayers-2.8/examples/getfeatureinfo-control.html
using mapserver instead of geoserver.
When I click to query in my app the following request is generated by 
openlayers:
http://example.com/cgi-bin/mapserv?map=/maps/test-900913-wms.map&&service=WMS&version=1.1.0&request=GetFeatureInfo&layers=Parcels&query_layers=Parcels&styles=&bbox=-10739792.365943%2C3773437.912618%2C-10739165.343461%2C3774064.9351&srs=EPSG%3A900913&feature_count=1&x=234&y=399&height=525&width=525&info_format=text%2Fhtml
And I get this response:
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.0/exception_1_1_0.dtd">
<ServiceExceptionReport version="1.1.0">
<ServiceException>
msReturnPage(): Web application error. Malformed template name 
(parcels.hdr).
</ServiceException>
</ServiceExceptionReport>
The templates are in the SHAPEPATH directory. The Layer looks like:
     LAYER
         NAME "Parcels"
         METADATA
             wms_title "Parcels"
         END
         TRANSPARENCY ALPHA
         STATUS ON
         CONNECTIONTYPE postgis
         CONNECTION "user=**** dbname=mytestdata host=localhost"
         DATA "the_geom from (select * from parcels) as foo using 
SRID=900913 using unique gid"
         TYPE POLYGON
         LABELITEM "parcel_id"
         MAXSCALEDENOM 4000
         HEADER   "parcels.hdr"
         TEMPLATE "parcels.tpl"
         FOOTER   "parcels.ftr"
         DUMP TRUE
         PROJECTION
             "init=epsg:900913"
         END
         CLASS
             STYLE
                 COLOR -1 -1 -1
                 WIDTH 2
                 OUTLINECOLOR 255 0 255
             END
             LABEL
                 TYPE TRUETYPE
                 FONT "arial"
                 SIZE 7
                 COLOR "#000000"
                 PARTIALS FALSE
             END
         END
     END
Running:
MapServer version 5.6.0-beta5 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG 
OUTPUT=WBMP OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE 
SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT 
SUPPORTS=WFS_SERVER SUPPORTS=RGBA_PNG INPUT=EPPL7 INPUT=POSTGIS 
INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE
Any ideas would be appreciated.
-Steve W.
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
    
    
More information about the MapServer-users
mailing list