mapscript removestyle() help
Eijnden, B. van den (Bart)
b.vdeijnden at AGI.RWS.MINVENW.NL
Tue Feb 7 22:05:45 PST 2006
See
http://mapserver.gis.umn.edu/docs/reference/phpmapscript-class/referencemanu
al-all-pages
int deletestyle(int index)
Delete the style specified by the style index. If there are any
style that follow the deleted style, their index will decrease by 1.
NOTE : if you are using the numstyles parameter while using the
deletestyle function on the class object you need to refetch
a new class object. Example :
//class has 2 styles
$class = $oLayer->getclass(0);
$class->deletestyle(1);
echo $class->numstyles; : will echo 2
$class = $oLayer->getclass(0);
echo $class->numstyles; : will echo 1
Bart
-----Oorspronkelijk bericht-----
Van: UMN MapServer Users List
[mailto:MAPSERVER-USERS at LISTS.UMN.EDU]Namens krishna S
Verzonden: dinsdag 7 februari 2006 23:42
Aan: MAPSERVER-USERS at LISTS.UMN.EDU
Onderwerp: [UMN_MAPSERVER-USERS] mapscript removestyle() help
Hello all, i was trying to remove the styles object from the styles array
using php mapscript and i couldnt get the syntax for it.
i dont know if these lines need some thing else
$layername = $map->getLayerByName("somelayer");
$class = $layername->getClass(0);
$style = ms_newStyleObj($class);
$temp = $class.removeStyle(0);
Could anyone suggest me with this ....
-kris
Disclaimer
************************************************************************
Aan dit bericht kunnen geen rechten worden ontleend. Dit bericht is
uitsluitend bestemd voor de geadresseerde. Als u dit bericht per abuis
hebt ontvangen, wordt u verzocht het te vernietigen en de afzender te
informeren. Wij adviseren u om bij twijfel over de juistheid of de
volledigheid van de mail contact met afzender op te nemen.
This message shall not constitute any rights or obligations.
This message is intended solely for the addressee.
If you have received this message in error, please delete it and
notify the sender immediately. When in doubt whether this message
is correct or complete, please contact the sender.
************************************************************************
More information about the MapServer-users
mailing list