Iterator<ILayer> iterator = mapLayers.iterator();
while (iterator.hasNext()) {
ILayer layer = iterator.next();
IGeoResource geoResource = layer.findGeoResource(MapMarksGraphics.class);
if (geoResource != null) {
map.sendCommandASync(new DeleteLayerCommand((Layer) layer));
break;
}
}
}