Closed mapserver-bot closed 12 years ago
Author: sgillies@frii.com Date: 2004/11/13 - 18:26
There is an important difference between the CGI mapserver and mapscript.
In a mapfile you can set a STYLE to reference a SYMBOL by name. In mapscript,
a style has to reference a symbol by the index of the symbol within the
map's symbolset.
You must do something like this
style = new styleObj(class) # adds a style
logo_index = map.symbolset.index('logo') # finds index of logo symbol
style.setSymbol(logo_index)
Try this with the mapserver 4.4 beta2.
Also I noticed one more thing in your program -- do not set map height and
width seperately. You should use the new setSize() method:
map.setSize(width, height)
Please confirm.
Author: mapserver@geochem.de Date: 2004/11/13 - 19:35
I modified my java application according to your hint and the mapscript docs.
See the attached file. Sadly i still get back a blank image. I tried this script
with the latest CVS version. Anything else to do?
Author: mapserver@geochem.de Date: 2004/11/13 - 19:40
Sean,
i found my mistake. I forget to add the line:
map.setSymbolset(symbolset);
Seams that i have to read the docs more exacty. Now it works.
Nicol
Author: sgillies@frii.com Date: 2004/11/14 - 01:55
OK, closing up the bug.
attachment http://trac.osgeo.org/mapserver/attachment/ticket/1058/symbols_point.java :
Java-Application Script which shows the problem
Reporter: mapserver@geochem.de Date: 2004/11/12 - 19:06 Trac URL: http://trac.osgeo.org/mapserver/ticket/1058