[mapserver-users] GetFeatureInfo - something not adding up

Fawcett, David David.Fawcett at state.mn.us
Thu Jul 2 12:10:41 EDT 2009


It may be the case that MapServer isn't recognizing the variables
because they are in the wrong case.  I believe that when the columns
come from a shapefile, the column names are all upper case.  Try
changing all of the substitution vars in your template to upper case.  

David.  



-----Original Message-----
From: mapserver-users-bounces at lists.osgeo.org
[mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of stretch
Sent: Thursday, July 02, 2009 11:03 AM
To: mapserver-users at lists.osgeo.org
Subject: [mapserver-users] GetFeatureInfo - something not adding up



Hi All

I am doing a GetFeatureInfo Through Openlayers. All seems to be working
fine (i.e. template comes up) except it is not returning any values.
What happens is that template is returned but the values are not
populated - i.e Compt
No: [Compt_No] instead of Compt_no: A03 etc

Here is my URL

http://localhost/cgi-bin/masonite.asp?mf=bartonheights.map&LAYERS=Compar
tments&SERVICE=WMS&VERSION=1.0.0&REQUEST=GetFeatureInfo&STYLES=&EXCEPTIO
NS=application%2Fvnd.ogc.se_xml&FORMAT=png&SRS=EPSG%3A2054&BBOX=-81259.3
86908%2C-3308449.52709%2C-73921.613092%2C-3305902.47291&X=342&Y=226&INFO
_FORMAT=text%2Fhtml&QUERY_LAYERS=Compartments&WIDTH=1040&HEIGHT=361

------------------------------------------------------------------------
----
My Map file (parts of it)
   # WMS server settings
    METADATA
         'wms_title'           'masonite'
         'wms_onlineresource'  'http://zzzzz/masonite.asp?'
	 'wms_srs'             'EPSG:2054'
	  'wms_feature_info_mime_type' 'text/html'
	  'ows_include_items' 'all' 
    END


LAYER
    NAME 'Compartments'
    TYPE POLYGON
    DATA 'Farms\BartonHeights\Basedata\Compartments.shp'
	TEMPLATE "Compartments.html"  #For select feature
	TOLERANCE 15 
	TOLERANCEUNITS PIXELS

------------------------------------------------------------------
And my Template File
<!-- MapServer Template -->
<TABLE width="98%">
<tr><td>Compartment</td></tr>
<tr><td>Compt No: [Compt_No]</td></tr>
<tr><td>Age: [Age]</td></tr>
<tr><td>Area: [Area_ha]</td></tr>
<tr><td>Species: [Species]</td></tr>
<tr><td>Plant Year: [Pd_yy]</td></tr>
<tr><td>Method: [Method]</td></tr>
</table>

Can anyone see anything drastically wrong. I have copied the template
from a mapserver 5 installation and added the "magic words" at the top -
is there anything else required

Thanks
Andrew


-- 
View this message in context:
http://n2.nabble.com/GetFeatureInfo---something-not-adding-up-tp3195907p
3195907.html
Sent from the Mapserver - User mailing list archive at Nabble.com.

_______________________________________________
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