[Chameleon] ROIFeatureTool - Resolved

Jeff Hamm jeff at geoprism.ca
Mon Sep 27 17:59:00 EST 2010

I resolved my problem by making the following changes in ROIManager/ROIRenderer.php (chameleon 2.6) :

 around line 256  : //The magic string must contain the key words <!-- MapServer Template --> on the first line of the template.
                $szTemplate = '[shpxy xf="," yf="," sf="|" proj="image"]';
                $hTemplate = fopen( $szTemplatePath, "w+" );
                fwrite( $hTemplate, "<!-- MapServer Template -->\n".$szTemplate );
                fclose( $hTemplate );

around line 283 : //The query file must have an extension of *.qy (see http://www.mail-archive.com/mapserver-users@lists.osgeo.org/msg10119.html)
                    // save the query results for future passes
                    $aROI['query_file'] = getSessionSavePath()."/".uniqid("").".qy";
                    $oNewMap->saveQuery( $aROI['query_file'] );

Both changes are required by Mapserver >5.x


Jeff Hamm

More information about the Chameleon mailing list