[mapserver-users] PHP Mapscript question

alim karim alim.karim at gmail.com
Thu Apr 3 16:40:37 EDT 2008


thanks for the response daniel.

i figured this out shortly after i posted the question.

getting the symbols by id  [1 ... numSymbols] does indeed work.

ak

On Thu, Apr 3, 2008 at 12:00 PM, Daniel Morissette <dmorissette at mapgears.com>
wrote:

> alim karim wrote:
>
> >
> > i would also like the user to be presented with a list of all the
> > symbols defined in the mapfile that i am working with. i have gone through
> > the API but haven't come across any functions that will allow me to
> > accomplish this. does such functionality exist in the API?
> >
> >
> The mapObj's getNumSymbols() and getSymbolObjectById() methods should
> allow you to do something like this (untested):
>
>
>  $numsymbols = $map->getNumSymbols();
>
>  # Start looping at 1 since symbol 0 is the default symbol
>  for ($id=1; $id < $numsymbols; $id++)
>  {
>    $symbol = $map->getSymbolObjectById($id);
>    # Do something with $symbol here... see the symbolObj class docs...
>  }
>
> Daniel
> --
> Daniel Morissette
> http://www.mapgears.com/
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20080403/d83d7516/attachment.html


More information about the mapserver-users mailing list