public void drawSymbol(Object parent, String name, Coordinate position, ShapeStyle style, String shapeTypeId) {
		if (isAttached()) {
			SymbolDefinition definition = symbolDefs.get(shapeTypeId);
			if (position == null) {
				return;
			}
			if (style == null) {
				style = definition.getStyle();
			}
			SymbolInfo symbol = definition.getSymbol();
			if (symbol.getRect() != null) {
				Element rect = helper.createOrUpdateElement(parent, name, "rect", style);

				// Real position is the upper left corner of the rectangle:
				float w = symbol.getRect().getW();
				float h = symbol.getRect().getH();
				applyAbsolutePosition(rect, new Coordinate(position.getX() - 0.5 * w, position.getY() - 0.5 * h));

				// width and height
				applyElementSize(rect, (int) w, (int) h, false);

			} else if (symbol.getCircle() != null) {
				Element circle = helper.createOrUpdateElement(parent, name, "oval", style);

				// Real position is the upper left corner of the circle:
				float radius = symbol.getCircle().getR();
				applyAbsolutePosition(circle, new Coordinate(position.getX() - radius, position.getY() - radius));

				// width and height are both radius*2
				int size = (int) (2 * radius);
				applyElementSize(circle, size, size, false);
			} else if (symbol.getImage() != null) {
				// Creating an image; ignoring style....
				Element image = helper.createOrUpdateElement(parent, name, "image", null);
				Dom.setElementAttribute(image, "src", Dom.makeUrlAbsolute(symbol.getImage().getHref()));
				int width = symbol.getImage().getWidth();
				int height = symbol.getImage().getHeight();
				applyElementSize(image, width, height, false);
				applyAbsolutePosition(image, new Coordinate(position.getX() - Math.round(width / 2), position.getY()
						- Math.round(height / 2)));
			}
		}
	}
public void drawSymbol ( Object parent , String name , Coordinate position , ShapeStyle style , String shapeTypeId ) { if ( isAttached ( ) ) { SymbolDefinition definition = symbolDefs . get ( shapeTypeId ) ; if ( position == null ) { return ; } if ( style == null ) { style = definition . getStyle ( ) ; } SymbolInfo symbol = definition . getSymbol ( ) ; if ( symbol . getRect ( ) != null ) { Element rect = helper . createOrUpdateElement ( parent , name , "rect" , style ) ; float w = symbol . getRect ( ) . getW ( ) ; float h = symbol . getRect ( ) . getH ( ) ; applyAbsolutePosition ( rect , new Coordinate ( position . getX ( ) - 0.5 * w , position . getY ( ) - 0.5 * h ) ) ; applyElementSize ( rect , ( int ) w , ( int ) h , false ) ; } else if ( symbol . getCircle ( ) != null ) { Element circle = helper . createOrUpdateElement ( parent , name , "oval" , style ) ; float radius = symbol . getCircle ( ) . getR ( ) ; applyAbsolutePosition ( circle , new Coordinate ( position . getX ( ) - radius , position . getY ( ) - radius ) ) ; int size = ( int ) ( 2 * radius ) ; applyElementSize ( circle , size , size , false ) ; } else if ( symbol . getImage ( ) != null ) { Element image = helper . createOrUpdateElement ( parent , name , "image" , null ) ; Dom . setElementAttribute ( image , "src" , Dom . makeUrlAbsolute ( symbol . getImage ( ) . getHref ( ) ) ) ; int width = symbol . getImage ( ) . getWidth ( ) ; int height = symbol . getImage ( ) . getHeight ( ) ; applyElementSize ( image , width , height , false ) ; applyAbsolutePosition ( image , new Coordinate ( position . getX ( ) - Math . round ( width / 2 ) , position . getY ( ) - Math . round ( height / 2 ) ) ) ; } } }
Draw a symbol, using some predefined ShapeType.

@param parent
parent group object
@param name
The symbol's name.
@param position
The symbol's (X,Y) location on the graphics.
@param style
The style to apply on the symbol. When the symbol is an image, the style will be ignored!
@param shapeTypeId
The name of the predefined ShapeType. This symbol will create a reference to this predefined type and
take on it's characteristics.