[OpenLayers-Users] Problem with WMSGetFeatureInfo erroring out

Stephen Woodbridge woodbri at swoodbridge.com
Fri Nov 20 16:45:13 EST 2009


Hi all,

I'm trying to WMSGetFeatureInfo but have the following problem when 
using it with mapserver:


http://example.com/cgi-bin/mapserv?map=/maps/test-900913-wms.map&&service=WMS&version=1.1.0&request=GetFeatureInfo&layers=OneMileETJ%2CLakes%2CParcels%2CRailroad%2CFMRoads%2CServiceRoads%2CStreets%2CHighways%2CInterstate%2CVoting_Precincts%2CCityLimits%2CZoning,FMRoads%2CServiceRoads%2CStreets%2CHighways%2CInterstate,Voting_Precincts,Zoning,Parcels&query_layers=OneMileETJ%2CLakes%2CParcels%2CRailroad%2CFMRoads%2CServiceRoads%2CStreets%2CHighways%2CInterstate%2CVoting_Precincts%2CCityLimits%2CZoning,FMRoads%2CServiceRoads%2CStreets%2CHighways%2CInterstate,Voting_Precincts,Zoning,Parcels&styles=%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C%2C,%2C%2C%2C%2C,,,&bbox=-10739792.365943%2C3773437.912618%2C-10739165.343461%2C3774064.9351&srs=EPSG%3A900913&feature_count=10&x=217&y=267&height=525&width=525&info_format=text%2Fhtml

And I get the following:

<?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>
msWMSFeatureInfo(): WMS server error. Unsupported INFO_FORMAT value 
(text/html).
</ServiceException>
</ServiceExceptionReport>


If I remove the 'info_format=text%2Fhtml' part from the url I get back:

GetFeatureInfo results:

Layer 'OneMileETJ'
   Feature 0:

Layer 'Parcels'
   Feature 1:

Layer 'Voting_Precincts'
   Feature 0:

Layer 'Zoning'
   Feature 1:

Which does not seem all that useful, but this is my first attempt, and 
I'm probably missing something basic.

A typical mapfile LAYER entry looks like:

     LAYER
         NAME "Parcels"
         METADATA
             wms_title "Parcels"
         END
         TRANSPARENCY ALPHA
         STATUS ON
         CONNECTIONTYPE postgis
         CONNECTION "user=****** dbname=mydb_test host=localhost"
         DATA "the_geom from (select * from parcels) as foo using 
SRID=900913 using unique gid"
         TYPE POLYGON
         LABELITEM "parcel_id"
         MAXSCALEDENOM 4000
         TEMPLATE "dummy"
         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

Any help would be appreciated.
   -Steve W



More information about the Users mailing list