[Chameleon] Query widget hilite raster fatal error

McGraw, Joanne mcgrawj at AGR.GC.CA
Thu Nov 24 17:04:32 EST 2005


Hello all, 

I have a map file that contains a raster, a couple polygon layers and a point layer. All are queryable and with the Query widget I can easily get the attributes for the raster, the polygons and the points near where I click. 

The problem occurs when I then try to use the querymap to hilite the respective elements and turn the Query widget's "highlighresults" attribute to true. No image is created and I receive the following errors at the " $oImage = $oMapSession->oMap->drawQuery();" line in 'drawmap.php':

Warning: [MapServer Error]: msDrawShape(): Unknown layer type. in C:\ms4w\apps\htdocs\php_test.php on line 27
Fatal error: Call to a member function on a non-object in C:\ms4w\apps\htdocs\php_test.php on line 28

If I turn the querying capabilities on the raster off, the hiliting of the polygon and point layers works fine. So, the problem appears to be that Mapserver is, for some reason, trying to create a hilite shape for the raster.

Now, I want to be able to query the raster values, but do not require (or even expect) anything to be hilited for it. Mapserver, really, should just ignore those for that process and continue with the rest of the layers. 

Has anyone else come up against this? And, gotten around it somehow? I don't really want to make changes to the "drawmap.php" which could be lost with deployment of an upgrade. The only other thing I can think of is to extend the Query object and create a new hidden variable that lists all the queryable layers and overrides the QueryWMouseClick function, passing a list of gszQueryLayers that doesn't include the raster layer to the drawmap.php call. If that's my best option, that's okay but I thought I'd see if anyone else had dealt with this in some other way first.


Cheers,
jtm


Joanne T. McGraw
GIS Data Analyst / Analyste des données du SIG
Agriculture and Agri-Food Canada / Agriculture et Agroalimentaire Canada
Telephone/Téléphone: (613) 759-6103
Facsimile/Télécopieur: (613) 759-1937
960 Carling Ave, #1136
Ottawa, Ontario
K1A 0C6

mcgrawj at agr.gc.ca
 




More information about the Chameleon mailing list