When I send a GetFeatureInfo
request to my Mapserver 6.4 WMS, the response contains the geometry. I want to disable this, as it is far too large in size. However, I am serving the same data as a WFS from Mapserver, and don't want to lose geometry from that.
Elsewhere, I was told to try the following in my mapfile's metadata:
wfs_mygeom_type "multipolygon"
wfs_geometries "mygeom"
This has no effect for me – geometry is still returned for a WMS GetFeatureInfo request.
How do I prevent geometry returning in WMS GetFeatureInfo only?
Best Answer
(for other readers: this was initially asked on Twitter, and I answered there at https://twitter.com/mapserving/status/1428728627076780036 )
Here is my mapfile that was used for that answer, that disables geometry for WMS GetFeatureInfo requests, and enables geometry for WFS GetFeature requests (see settings in LAYER "countries" metadata object):
Happy mapserving!
-jeff