Hi,In my MapViewer I want to add a MapTitle, MarkerNorthArrow, AlternatingScaleBar & ScaleText.I am not being able to position the title correctly.When I zoom the title disappears! but North arrow, scale bar etc remains.I am following this http://resources.arcgis.com/en/help/arcobjects-java/concepts/engine/index.html#/How_to_interact_with...IEnvelope env1 = new Envelope();
env1.putCoords(7, 25, 12, 20);
UID titleUID = new UID();
titleUID.setValue("esriCarto.MapTitle");
MapTitle title = new MapTitle();
title.setMapByRef(docMap);
IMapSurroundFrame titleMapSurroundFrame = docMapFrame.createSurroundFrame(titleUID, null);
String name = DEM.getName();
if (DEM.getName().contains(".")) {
name = DEM.getName().substring(0, DEM.getName().lastIndexOf("."));
}
titleMapSurroundFrame.getMapSurround().setName(name.toUpperCase());
IElement titleElement = (IElement)titleMapSurroundFrame;
titleElement.setGeometry(env1);
titleElement.activate(docActiveView.getScreenDisplay());
docGraphicsContainer.addElement(titleElement, 1);
Thanks,Avishek