<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi again,<br>
<br>
Thanks for the help, I think I am close to the solution but it is still
not working as I get the following error :<br>
<pre>java.lang.UnknownError: msGetBitmapFont(): GD library error. Invalid bitmap font. Must be one of tiny, small, medium, large or giant.
edu.umn.gis.mapscript.mapscriptJNI.mapObj_drawLabelCache(Native Method)
edu.umn.gis.mapscript.mapObj.drawLabelCache(mapObj.java:403)
</pre>
I thougth I have to use the setSize funtction of the labelObj class to
set the BitmapFont as MS_BITMAP_FONT_SIZES.MS_LARGE. But it is not
working.<br>
Here is what I have done in my layerObj :<br>
<br>
my_layer_item.setType(MS_LAYER_TYPE.MS_LAYER_POINT);<br>
<br>
pointObj legendpoint = new pointObj(10,10,0,0);<br>
<br>
lineObj legendline = new lineObj();<br>
legendline.add(legendpoint);<br>
<br>
shapeObj legendfeat = new
shapeObj(MS_SHAPE_TYPE.MS_SHAPE_POINT.swigValue());<br>
legendfeat.add(legendline);<br>
legendfeat.setText("Blablabla");<br>
<br>
my_layer_item.addFeature(legendfeat);<br>
<br>
classObj my_class = new
classObj(my_layer_item.layer_object);<br>
styleObj my_style = new styleObj(my_class);<br>
my_style.setColor(new colorObj(0, 0, 0, -4));<br>
my_style.setSize(50);<br>
my_style.setSymbolname("kreis");<br>
<br>
labelObj my_label = my_class.getLabel();<br>
my_label.setType(MS_FONT_TYPE.MS_BITMAP); <br>
my_label.setColor(new colorObj(0, 0, 0, -4));<br>
my_class.getLabel().setPosition(MS_POSITIONS_ENUM.MS_UC.swigValue()); <br>
my_label.setSize(MS_BITMAP_FONT_SIZES.MS_LARGE.swigValue());<br>
my_label.setForce(mapscriptConstants.MS_TRUE);<br>
<br>
my_layer_item.setStyleName("Test");<br>
my_layer_item.setProjection(4030);<br>
my_layer_item.setStatus(true);<br>
<br>
The corresponding mapfile is :<br>
<br>
LAYER<br>
NAME Test<br>
TYPE POINT<br>
STATUS DEFAULT<br>
<font color="#cc0000">FEATURE<br>
POINTS<br>
10 10<br>
END<br>
TEXT "Blablabla"<br>
END</font><br>
CLASS<br>
STYLE<br>
SYMBOL "kreis"<br>
SIZE 50<br>
COLOR 0 0 0<br>
END<br>
LABEL<br>
TYPE BITMAP<br>
SIZE MEDIUM<br>
COLOR 0 0 0<br>
POSITION UC<br>
END<br>
END<br>
END<br>
<br>
Any helps is welcome. <br>
Thanks in advance<br>
<br>
Trolet Julien<br>
</body>
</html>