Dear all,
I'm working with a MAP having one single raster layer which points to a georeferenced raster file. Users of my application can change the data shown by using mapscript 'data' susbtitution as I commented many previous messages: My layer in map file: ===================== LAYER NAME landuse TYPE RASTER DATA "file01.tif" END In globals.php: =============== $wdata=$_REQUEST['wdata']; # wdata points to a new raster image selected by user if ($wdata != '') { $mylayer=$map->getLayerByName('landuse'); $mylayer->set("data",$wdata); } I've recently changed the layer definition a little to make it queriable and it works nicely: LAYER NAME landuse TYPE RASTER DATA "file01.tif" TOLERANCE 0 TOLERANCEUNITS pixels TEMPLATE void METADATA "RESULT_HEADERS" "xcoord,ycoord" "RESULT_FIELDS" "x,y" END END However, I've noticed that everything works ok as long as the raster images cover the same area as the one initially defined in then map file. When I switched to a new raster (i.e. centered at different geographic coordinates), the query reported sometimes a "no data found" message. It seems that the information about layer extension is read once from MAP file when loading Pmapper and isn't updated although 'data' had been changed in globals.php. I thought defining layer EXTENT in map file would work but it doesn't. A workaround to this seem to be declaring in the mapfile a "dumb" blank georeferenced raster which englobe all areas. Doing so, no matter which new raster is loaded "mapscriptically" the query tool will work ok. Comments and/or ideas would be appreciated. Regards ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ pmapper-users mailing list pmapper-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pmapper-users