* Method chooses what type of geometry to render.
*
* @param mg Database object which will be rendered
*/
protected OMGraphic createGraphic(MysqlGeometry mg) {
OMGraphic ret = null;
if (mg != null) {
String type = mg.getType();
if (type.equals(MysqlGeometry.POINTTYPE)) {
ret = createPoint((MysqlPoint) mg);
} else if (type.equals(MysqlGeometry.LINESTRINGTYPE)) {
ret = createLine((MysqlLine) mg);
} else if (type.equals(MysqlGeometry.POLYGONTTYPE)) {
ret = createPolygon((MysqlPolygon) mg);
} else if (type.equals(MysqlGeometry.MULTIPOINTTYPE)
|| type.equals(MysqlGeometry.MULTILINESTRINGTYPE)
|| type.equals(MysqlGeometry.MULTIPOLYGONTYPE)
|| type.equals(MysqlGeometry.GEOMETRYCOLLECTIONTYPE)) {
MysqlMulti multi = (MysqlMulti) mg;
OMGraphicList subList = new OMGraphicList();
for (int i = 0; i < multi.countElements(); i++) {
OMGraphic subRet = null;
if (type.equals(MysqlGeometry.MULTIPOINTTYPE)) {
subRet = createPoint((MysqlPoint) multi.getElementByIndex(i));
} else if (type.equals(MysqlGeometry.MULTILINESTRINGTYPE)) {
subRet = createLine((MysqlLine) multi.getElementByIndex(i));
} else if (type.equals(MysqlGeometry.MULTIPOLYGONTYPE)) {