public MapNode addMarker(float lat, float lon) {
long id = 1;
for (MapNode node : markers)
if (node.getId() >= id)
id = node.getId() + 1;
MapNode node = new DefaultMapNode(id);
node.setName(Long.toString(id));
List<EntityAttribute> atts = new ArrayList<EntityAttribute>(1);
atts.add(new EntityAttribute("marker", "yes"));
node.setAttributes(atts);
node.setPosition(lat, lon);
updateEntityViewInfo(node, false);
markers.add(node);
fireMapDataEvent(new MapEvent(this, MapEvent.Type.MARKER_ADDED, node
.getId()));
return node;
}