[Mapserver-users] Change layerobj's data property
Eric Bridger
eric at gomoos.org
Fri Jan 16 06:26:48 PST 2004
I use this method with Mapserver/mapscript 3.6.6 with no problems.
But I don't rely on mapscript to use the SHAPEPATH, I always use the
full path for the layer->data member. Try that. You should be able to
retrieve the SHAPEPATH from the map object $map->shapepath.
Eric
On Fri, 2004-01-16 at 07:47, Homme Zwaagstra wrote:
> Hello,
>
> I have a problem with mapserver 3.5 (a fuzzy memory to many of you, I
> know!) that I'm hoping someone will be able to shed some light
> on. I have a raster layer with a default data property that extends
> the SHAPEPATH:
>
> LAYER
> NAME nhs_direct
> TYPE RASTER
> STATUS ON
> DATA nhs_direct_live/6-11-2003_2.tiff
> OFFSITE 0
> PROJECTION
> "proj=tmerc"
> "lat_0=49.000000000"
> "lon_0=-2.000000000"
> "k=0.999601"
> "y_0=-100000.000"
> "x_0=400000.000"
> "ellps=airy"
> "towgs84=375,-111,431,0,0,0,0"
> "units=m"
> END
> END
>
> I have many hundreds of rasters representing the same area but for
> different temporal windows. Using PHP Mapscript I'm wanting to change
> the data property, based on user date selection, to display the
> correct raster. Something like this:
>
> $layerObj = $mapObj->getlayerByName('nhs_direct');
> $layerObj->data = 'nhs_direct_live/7-01-2002_2.tiff'
>
> This doesn't seem to have any effect, however, and the original file
> that DATA points to is always displayed.
>
> System Details:
> MapServer version 3.5 OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP SUPPORTS=PROJ
> SUPPORTS=TTF SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT INPUT=TIFF
> INPUT=EPPL7 INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL
> INPUT=SHAPEFILE
> PHP Version 4.0.6
> Apache/1.3.27
> gcc version 2.96 20000731 (Red Hat Linux 7.2 2.96-112.7.1)
>
> Can anyone think of a solution? Is it time to bite the bullet and
> upgrade?!
>
> Regards,
>
> Homme Zwaagstra
>
> --
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>
More information about the MapServer-users
mailing list