Updatating DATA value of a layer inside a mapfile
    Daniel Morissette 
    dmorissette at MAPGEARS.COM
       
    Sat Oct 28 05:53:36 PDT 2006
    
    
  
Well, maybe if you told us what didn't work then we could provide better 
hints, but for now I'll assume that you do not see your layer when you 
draw the map later on and you are wondering if this is because the new 
data value is not set.
You could save the map state using $map->save("/tmp/test.map") after the 
set() calls and see if the data value is set properly or not. If you see 
the right data value in /tmp/test.map there then the problem (whatever 
it is) is somewhere else.
Daniel
Luca Casagrande wrote:
> Hi to all!
> I am trying to update the value DATA of a layer called visibility, using php mapscript; those are the lines i am testing:
> 
>     $this_layer = $map->getLayerByName('visibility');
>     $this_layer->set('data', $data_path );
>     $this_layer->set('status', MS_ON);
> 
> with
> 
>  echo $data_path
>  /var/www/localhost/htdocs/wps/wpsoutputs/output-2006-10-28-3-0-2.tif
> 
> Notice that if i change by hand the mapfile, putting the DATA path i wrote over here,
> all is working fine.
> 
> What i am missing?
> 
> Bye
> Luca
-- 
Daniel Morissette
http://www.mapgears.com/
    
    
More information about the MapServer-users
mailing list