[Mapserver-users] bug #316 and ms4 missing functions
Paul Spencer
spencer at dmsolutions.ca
Wed Jul 2 04:28:02 PDT 2003
Twan,
The format of the mapfile has changed somewhat. Two of the changes
relate to your problem.
The symbol is now part of a new style object, that is part of a class
object. Color objects are no longer referenced by index because of 24
bit support, you now have an API to set the RGB color directly.
This means that you would make the following:
$co = ms_newClassObj($lo);
$co->set("name", "mysym" );
$st = ms_newStyleObj($co);
$st->set( "symbol", $mymap->getSymbolByName('star') );
$co->label->backgroundcolor->SetRGB( 255, 255, 255 );
The migration guide that explains these and other changes is at:
http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?MigrationGuide
I recommend that you investigate the README in the mapscript/php3
directory for specific API details.
I don't know how difficult back-porting the postgis query bug would be.
Cheers,
Paul
Twan Kogels wrote:
> Hello,
>
> Tomorrow i've hit a know bug when quering a postgis layer with mapserver
> 3.6.5, its on bugszilla
> <http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=316>
>
> So i tryed the latest cvs version of mapserver (4.0b), it configures and
> compiles oke. But it some mapscript functions seems to have dissapear,
> for example i have mapscript generate a postgis layer:
>
> ==========
> $co=ms_newClassObj($lo);
> $co->set("name", "mysym");
> $temp=$mymap->getSymbolByName('star');
> $co->set("symbol", $temp);
> ==========
>
> This part of code returns a error:
> ==========
> Property 'symbol' does not exist in this object.
> ==========
>
> The same happens with:
>
> ==========
> $co->label->set("type", MS_BITMAP);
> $co->label->set("backgroundcolor", $mymap->addColor(255,255,225));
> ==========
>
> results in:
> ==========
> Call to undefined function: addcolor()
> ==========
>
> These mapscript functions are doing it correct with mapserver 3.6.5.
>
> Is it possible that i've downloaded a cvs version where some mapscript
> functions are broken? If so, is it possible for me to modify the
> mapserver 3.6.5 source (which functions perfect) so bug #316 won't
> appear anymore?
>
> Best regards,
> Twan Kogels
>
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>
--
Paul Spencer
Applications and Software Development
DM Solutions Group Inc.
http://www.dmsolutions.ca
More information about the MapServer-users
mailing list