|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.micello.mapapi.render.MapViewRegion
public class MapViewRegion
This class manages the viewport to the map in the MicelloMapView. An instance of MapViewRegion can be obtained from the static class MicelloManager. An manipulation of the view region should be done through this class.
| Nested Class Summary | |
|---|---|
static class |
MapViewRegion.MapToTileData
This class wraps the transformation data between the map coordinates system and the zoom = 1 tile coordinate system. |
| Field Summary | |
|---|---|
static int |
END_X
|
static int |
END_Y
|
static int |
START_X
|
static int |
START_Y
|
| Fields inherited from interface com.micello.mapapi.data.CommunityChangedListener |
|---|
COMMUNITY_CHANGED, DRAWING_CHANGED, ENTITIES_LOADED, GEOMETRY_LOADED, LEVEL_CHANGED, LEVEL_READY, META_DATA_LOADED |
| Constructor Summary | |
|---|---|
MapViewRegion(MicelloManager micelloManager)
Constructor |
|
| Method Summary | |
|---|---|
void |
clearDynamicZoom()
Thie methods sets the dynamic zoom to 1. |
float |
getStaticZoomScale()
This method retrieves the zoom scale of the rendered ties relative to the base scale of the map. |
int |
getSurfaceHeight()
This method returns the current surface height. |
int |
getSurfaceWidth()
This returns the current surface width. |
float |
getTotalZoomScale()
This returns the sum of the static zoom scale and the current dynamic zoom scale to give the total zoom scale. |
void |
onCommunityChanged(Community comunity,
Drawing drawing,
DrawingLevel level,
int flags)
This is part of the drawing changed listener implementation. |
void |
onCommunityError(int cid,
int did,
int lid,
int error,
int flags)
This is part of the drawing changed listener implementation. |
void |
pan(float dPixX,
float dPixY)
This method pans the map a specified number of pixels. |
void |
setAngleDegrees(float angleDegrees)
This sets the rotation angle in degrees from the default rotation. |
void |
setDynamicAngleDegrees(float angleDegrees)
This method sets the dynamic rotation angle for the map, which is executed as a rotation of the map image, as opposed to rendering the image at this angle. |
void |
setDynamicZoom(float zoomFactor,
float centerPixX,
float centerPixY)
This method sets the dynamic zoom scale for the map, which is executed as a scaling of the map image, as opposed to rendering the image at this scale. |
void |
setNorthUp(boolean northUp)
If north up is set to true, the map will have north at the top of the map. |
void |
setTileToMapTransform(Matrix tileToMapTransform)
This method initializes a base transformation between map space and tile space. |
void |
setView(float zoomScale,
float centerMapX,
float centerMapY)
This method set the visible view of the map. |
void |
zoom(float zoomFactor)
This method zooms the map by the given factor, around the center of the screen. |
void |
zoom(float zoomFactor,
float startCenterPixX,
float startCenterPixY)
This method zooms the map by the given factor around the specified point. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int START_X
public static final int START_Y
public static final int END_X
public static final int END_Y
| Constructor Detail |
|---|
public MapViewRegion(MicelloManager micelloManager)
| Method Detail |
|---|
public void setNorthUp(boolean northUp)
public void setTileToMapTransform(Matrix tileToMapTransform)
public void onCommunityChanged(Community comunity,
Drawing drawing,
DrawingLevel level,
int flags)
onCommunityChanged in interface CommunityChangedListenercomunity - The relevant community object. May be null.drawing - The relevant drawing object. May be null.level - The relevent level object. May be null.flags - flags indicating the event
public void onCommunityError(int cid,
int did,
int lid,
int error,
int flags)
onCommunityError in interface CommunityChangedListenercid - The relavant community iddid - The relevant drawing idlid - The relevant level iderror - An error codeflags - flags indicating the event
public void setView(float zoomScale,
float centerMapX,
float centerMapY)
public void setAngleDegrees(float angleDegrees)
public void setDynamicAngleDegrees(float angleDegrees)
public void setDynamicZoom(float zoomFactor,
float centerPixX,
float centerPixY)
public void clearDynamicZoom()
public void pan(float dPixX,
float dPixY)
public void zoom(float zoomFactor)
public void zoom(float zoomFactor,
float startCenterPixX,
float startCenterPixY)
public float getStaticZoomScale()
public float getTotalZoomScale()
public int getSurfaceWidth()
public int getSurfaceHeight()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||