|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.micello.mapapi.data.MapData
public class MapData
This class manages the map data including the base map and map annotations.
The map data is managed with this class and the viewport to the map is managed
with the class MapViewRegion. The class MicelloMapView renders
the data given by MapData with a viewport given by MapViewRegion. The active MapData object
as well as the MapViewRegion object can be accessed from the static class MicelloManager.
This class is used to open a community as well as to change the active map and level. This class is also used to hold the annotations for the map. The annotations should be added using an annotation layer, which manages the groups of annotations.
| Constructor Summary | |
|---|---|
MapData(MicelloManager micelloManager)
Constructor |
|
| Method Summary | |
|---|---|
void |
addCommunityChangedListener(CommunityChangedListener communityChangedListener)
This method adds a community data listener. |
void |
addLayer(AnnotationLayer layer)
This method adds a new annotation layer to the map data. |
void |
clearCommunity()
This method clears the community from the MapData and map rendering objects. |
void |
communityLoaded(Community community)
This is an implementation of the CommunityDataListener interface |
void |
drawingEntitiesLoaded(int did,
java.lang.String lang,
int version,
java.util.List<Entity> entityList)
This is an implementation of the DrawingEnityDataListener interface |
Community |
getCommunity()
Thie method gets the current community. |
Drawing |
getCurrentDrawing()
This method gets the current drawing. |
DrawingLevel |
getCurrentLevel()
This method gets the currently rendered level. |
Drawing |
getDrawing(int drawingId)
This method returns the drawing given by the passed drawing id. |
int |
getEntityVersion()
This method returns the entity version of the currently loaded community. |
java.util.List<AnnotationLayer> |
getLayerList()
This method returns a list of annotation layers currently registered. |
DrawingLevel |
getLevel(int levelId)
This method returns the level given by the passed level id. |
void |
getMapObjectInfo(GeomReference geomRef,
int levelId,
int entityId,
MapObjectInfoListener listener)
This method will load the MapObjectInfo for the given geometry reference with the entityId paremeter set. |
void |
getMapObjectInfo(GeomReference geomRef,
int levelId,
MapObjectInfoListener listener)
This method will load the MapObjectInfo for the given geometry reference. |
MapObjectInfo |
getMapObjectInfo(int markerOverlayId,
int levelId)
This method retrieves a MapObjectInfo for the specified marker overlay. |
MapObjectInfo |
getMapObjectInfo(int markerOverlayId,
int levelId,
boolean isoLevel)
This method retrieves a MapObjectInfo for the specified marker overlay and for a specific level. |
int |
getMapVersion()
This method returns the map version of the currently loaded community. |
MarkerOverlay |
getMarker(int markerId)
This method returns a marker from the given level id and marker id. |
Drawing |
getPendingDrawing()
This method gets the most recently set drawing. |
DrawingLevel |
getPendingLevel()
This method gets the most recently set drawing level. |
void |
levelGeometryLoaded(LevelGeometry levelGeom)
This is an implementation of the LevelGeometryDataListener interface |
void |
onCommunityError(int cid,
int error)
This is an implementation of the CommunityDataListener interface |
void |
onDrawingEntitiesError(int did,
int error)
This is an implementation of the DrawingEnityDataListener interface |
void |
onLevelGeometryError(int lid,
int error)
This is an implementation of the LevelGeometryDataListener interface |
void |
openCommunity(int communityId)
This method loads a community. |
void |
openCommunityAndDrawing(int communityId,
int drawingId)
This method loads a community as with the single argument, opening it to the specified drawing. |
void |
openCommunityAndLevel(int communityId,
int levelId)
This method loads a community as with the single argument, opening it to the specified level. |
void |
openLink(MapLink link)
This method opens the map to the given community, drawing and level. |
void |
removeCommunityChangedListener(CommunityChangedListener communityChangedListener)
This method removes a community data listener. |
void |
removeLayer(AnnotationLayer layer)
This method removes an annotation layer from the map data. |
void |
resetCommunity()
This method resets a community to the just opened state. |
void |
setDrawing(int drawingId)
This method sets the current drawing, which opens to the default level. |
void |
setLevel(int levelId)
This method sets the level to the level with the given level ID. |
void |
setTileManager(TileManager tileManager)
This method is for internal use only. |
void |
synchGeomData()
This method should only be called by the tile renderer to synchronize the geometry annotation data with the tile render thread. |
void |
synchLevelData()
This method should only be called by the map renderer to synchronize the requested level with the rendered level. |
void |
synchMarkerData()
This method should only be called by the map renderer to synchronize the marker annotation data with the map render thread. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MapData(MicelloManager micelloManager)
| Method Detail |
|---|
public void addCommunityChangedListener(CommunityChangedListener communityChangedListener)
public void removeCommunityChangedListener(CommunityChangedListener communityChangedListener)
public int getMapVersion()
public int getEntityVersion()
public Community getCommunity()
public Drawing getPendingDrawing()
public Drawing getCurrentDrawing()
public DrawingLevel getPendingLevel()
public DrawingLevel getCurrentLevel()
public Drawing getDrawing(int drawingId)
drawingId - The drawing id for the requested drawing
public DrawingLevel getLevel(int levelId)
levelId - The level id for the requested level
public void getMapObjectInfo(GeomReference geomRef,
int levelId,
MapObjectInfoListener listener)
geomRef - The geometry to loadlevelId - The level on which the geometry resideslistener - The listener to receive the object
public void getMapObjectInfo(GeomReference geomRef,
int levelId,
int entityId,
MapObjectInfoListener listener)
geomRef - The geometry to loadlevelId - The main level on which the geometry residesentityId - The entity active for this map object info referencelistener - The listener to receive the object
public MapObjectInfo getMapObjectInfo(int markerOverlayId,
int levelId)
markerOverlayId - The annotation id for the MarkerOverlaylevelId - The level to be used in the MapObjectInfo,
public MapObjectInfo getMapObjectInfo(int markerOverlayId,
int levelId,
boolean isoLevel)
markerOverlayId - The annotation id for the MarkerOverlaylevelId - The level to be used in the MapObjectInfo
public MarkerOverlay getMarker(int markerId)
markerId - The marker id
public void clearCommunity()
public void resetCommunity()
public void openCommunity(int communityId)
CommunityChangedListener is the callback that indicates changes in the community.
public void openCommunityAndDrawing(int communityId,
int drawingId)
public void openCommunityAndLevel(int communityId,
int levelId)
public void setDrawing(int drawingId)
public void setLevel(int levelId)
public void openLink(MapLink link)
public java.util.List<AnnotationLayer> getLayerList()
public void addLayer(AnnotationLayer layer)
public void removeLayer(AnnotationLayer layer)
public void synchLevelData()
public void synchMarkerData()
public void synchGeomData()
public void setTileManager(TileManager tileManager)
public void communityLoaded(Community community)
communityLoaded in interface CommunityDataListener
public void onCommunityError(int cid,
int error)
onCommunityError in interface CommunityDataListenerpublic void levelGeometryLoaded(LevelGeometry levelGeom)
levelGeometryLoaded in interface LevelGeometryDataListener
public void onLevelGeometryError(int lid,
int error)
onLevelGeometryError in interface LevelGeometryDataListener
public void drawingEntitiesLoaded(int did,
java.lang.String lang,
int version,
java.util.List<Entity> entityList)
drawingEntitiesLoaded in interface DrawingEntitiesDataListener
public void onDrawingEntitiesError(int did,
int error)
onDrawingEntitiesError in interface DrawingEntitiesDataListener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||