public class Java2DMapDisplay extends AbstractMapDisplay implements processing.core.PConstants
AbstractMapDisplay.QueueSorter, AbstractMapDisplay.ZoomComparator| Modifier and Type | Field and Description |
|---|---|
protected java.lang.Integer |
bgColor |
protected processing.core.PMatrix3D |
innerMatrix
The inner transformation matrix.
|
static org.apache.log4j.Logger |
log |
protected processing.core.PMatrix3D |
matrix
The outer transformation matrix.
|
processing.core.PApplet |
papplet |
allTilesLoaded, angle, grid_padding, height, images, innerAngle, innerOffsetX, innerOffsetY, innerScale, innerTransformationCenter, markerManagerList, max_images_to_keep, max_pending, offsetX, offsetY, pending, provider, queue, queueSorter, recent_images, scale, TILE_HEIGHT, TILE_WIDTH, transformationCenter, width, zoomComparatorADD, ALPHA, ALT, AMBIENT, ARC, ARGB, ARROW, BACKSPACE, BASELINE, BEVEL, BEZIER_VERTEX, BLEND, BLUR, BOTTOM, BOX, BREAK, BURN, CENTER, CHATTER, CHORD, CLAMP, CLOSE, CODED, COMPLAINT, CONTROL, CORNER, CORNERS, CROSS, CURVE_VERTEX, CUSTOM, DARKEST, DEG_TO_RAD, DELETE, DIAMETER, DIFFERENCE, DILATE, DIRECTIONAL, DISABLE_ASYNC_SAVEFRAME, DISABLE_BUFFER_READING, DISABLE_DEPTH_MASK, DISABLE_DEPTH_SORT, DISABLE_DEPTH_TEST, DISABLE_KEY_REPEAT, DISABLE_NATIVE_FONTS, DISABLE_OPENGL_ERRORS, DISABLE_OPTIMIZED_STROKE, DISABLE_STROKE_PERSPECTIVE, DISABLE_STROKE_PURE, DISABLE_TEXTURE_MIPMAPS, DODGE, DOWN, DXF, ELLIPSE, ENABLE_ASYNC_SAVEFRAME, ENABLE_BUFFER_READING, ENABLE_DEPTH_MASK, ENABLE_DEPTH_SORT, ENABLE_DEPTH_TEST, ENABLE_KEY_REPEAT, ENABLE_NATIVE_FONTS, ENABLE_OPENGL_ERRORS, ENABLE_OPTIMIZED_STROKE, ENABLE_STROKE_PERSPECTIVE, ENABLE_STROKE_PURE, ENABLE_TEXTURE_MIPMAPS, ENTER, EPSILON, ERODE, ESC, EXCLUSION, FX2D, GIF, GRAY, GROUP, HALF_PI, HAND, HARD_LIGHT, HINT_COUNT, HSB, IMAGE, INVERT, JAVA2D, JPEG, LANDSCAPE, LEFT, LIGHTEST, LINE, LINE_LOOP, LINE_STRIP, LINES, LINUX, MACOSX, MAX_FLOAT, MAX_INT, MIN_FLOAT, MIN_INT, MITER, MODEL, MODELVIEW, MOVE, MULTIPLY, NORMAL, OPAQUE, OPEN, OPENGL, ORTHOGRAPHIC, OTHER, OVERLAY, P2D, P3D, PATH, PDF, PERSPECTIVE, PI, PIE, platformNames, POINT, POINTS, POLYGON, PORTRAIT, POSTERIZE, PROBLEM, PROJECT, PROJECTION, QUAD, QUAD_BEZIER_VERTEX, QUAD_STRIP, QUADRATIC_VERTEX, QUADS, QUARTER_PI, RAD_TO_DEG, RADIUS, RECT, REPEAT, REPLACE, RETURN, RGB, RIGHT, ROUND, SCREEN, SHAPE, SHIFT, SOFT_LIGHT, SPAN, SPHERE, SPOT, SQUARE, SUBTRACT, SVG, TAB, TARGA, TAU, TEXT, THIRD_PI, THRESHOLD, TIFF, TOP, TRIANGLE, TRIANGLE_FAN, TRIANGLE_STRIP, TRIANGLES, TWO_PI, UP, VERTEX, WAIT, WHITESPACE, WINDOWS, X, Y, Z| Constructor and Description |
|---|
Java2DMapDisplay(processing.core.PApplet papplet,
AbstractMapProvider provider)
Creates a new MapDisplay with full canvas size, and given provider
|
Java2DMapDisplay(processing.core.PApplet papplet,
AbstractMapProvider provider,
float offsetX,
float offsetY,
float width,
float height)
Creates a new MapDisplay.
|
| Modifier and Type | Method and Description |
|---|---|
void |
calculateInnerMatrix() |
void |
calculateMatrix()
Updates the matrix to transform the map with.
|
protected TileLoader |
createTileLoader(Coordinate coord) |
void |
draw()
Draws the on the PGraphics canvas.
|
float[] |
getInnerObject(ScreenPosition screenPosition) |
float[] |
getInnerObjectFromLocation(Location location) |
float[] |
getInnerObjectFromObjectPosition(float x,
float y) |
float[] |
getInnerObjectFromScreenPosition(float x,
float y)
Deprecated.
|
processing.core.PGraphics |
getInnerPG() |
Location |
getLocation(float x,
float y) |
Location |
getLocation(ScreenPosition screenPosition) |
Location |
getLocationFromInnerObjectPosition(float x,
float y) |
Location |
getLocationFromObjectPosition(float x,
float y) |
Location |
getLocationFromScreenPosition(float x,
float y)
Deprecated.
|
float[] |
getObjectFromInnerObjectPosition(float x,
float y) |
float[] |
getObjectFromLocation(Location location) |
float[] |
getObjectFromScreenPosition(float x,
float y) |
processing.core.PGraphics |
getOuterPG() |
float[] |
getScreenFromInnerObjectPosition(float x,
float y) |
float[] |
getScreenFromObjectPosition(float x,
float y) |
ScreenPosition |
getScreenPosition(Location location) |
ScreenPosition |
getScreenPositionFloat(Location location) |
float[] |
getScreenPositionFromLocation(Location location)
Deprecated.
|
protected float[] |
getTransformedPosition(float x,
float y,
boolean inverse)
Calculates offset and rotation for screen canvas position, to be used with the internal transformation matrix.
|
protected java.util.Vector |
getVisibleKeys(processing.core.PGraphics pg) |
protected void |
postDraw()
Is called last in
draw(). |
void |
setBackgroundColor(java.lang.Integer color)
Sets background color of map.
|
void |
tilesLoaded()
Gets called if all tiles have been loaded.
|
addMarker, addMarkerManager, addMarkers, allTilesLoaded, cleanupImageBuffer, cleanupImageBuffer, createDefaultMarkerManager, getDefaultMarkerManager, getHeight, getInnerTransformationCenter, getLastMarkerManager, getMapProvider, getMarkerManager, getMarkerManager, getMarkerManagerList, getMask, getTransformationCenter, getWidth, grabTile, processQueue, removeMarkerManager, removeMarkerManager, resize, setInnerTransformationCenter, setMapProvider, setProvider, setTransformationCenter, tileLoadedpublic static org.apache.log4j.Logger log
public processing.core.PApplet papplet
protected processing.core.PMatrix3D innerMatrix
protected processing.core.PMatrix3D matrix
protected java.lang.Integer bgColor
public Java2DMapDisplay(processing.core.PApplet papplet,
AbstractMapProvider provider)
public Java2DMapDisplay(processing.core.PApplet papplet,
AbstractMapProvider provider,
float offsetX,
float offsetY,
float width,
float height)
public void tilesLoaded()
tilesLoaded in class AbstractMapDisplaypublic void calculateMatrix()
calculateMatrix in class AbstractMapDisplaypublic void calculateInnerMatrix()
calculateInnerMatrix in class AbstractMapDisplaypublic float[] getObjectFromScreenPosition(float x,
float y)
getObjectFromScreenPosition in class AbstractMapDisplaypublic float[] getScreenFromObjectPosition(float x,
float y)
getScreenFromObjectPosition in class AbstractMapDisplayprotected float[] getTransformedPosition(float x,
float y,
boolean inverse)
AbstractMapDisplaygetTransformedPosition in class AbstractMapDisplayx - Cartesian x coordinate.y - Cartesian y coordinate.inverse - Indicates back and forward matrix calculation. Inverse is used for point2location, non-inverse for
location2point.public float[] getObjectFromInnerObjectPosition(float x,
float y)
getObjectFromInnerObjectPosition in class AbstractMapDisplaypublic float[] getInnerObjectFromObjectPosition(float x,
float y)
getInnerObjectFromObjectPosition in class AbstractMapDisplaypublic float[] getScreenFromInnerObjectPosition(float x,
float y)
getScreenFromInnerObjectPosition in class AbstractMapDisplay@Deprecated
public float[] getInnerObjectFromScreenPosition(float x,
float y)
getInnerObjectFromScreenPosition in class AbstractMapDisplaypublic float[] getInnerObject(ScreenPosition screenPosition)
getInnerObject in class AbstractMapDisplaypublic float[] getObjectFromLocation(Location location)
getObjectFromLocation in class AbstractMapDisplaypublic Location getLocationFromInnerObjectPosition(float x, float y)
getLocationFromInnerObjectPosition in class AbstractMapDisplay@Deprecated public Location getLocationFromScreenPosition(float x, float y)
getLocationFromScreenPosition in class AbstractMapDisplaypublic Location getLocation(float x, float y)
getLocation in class AbstractMapDisplaypublic Location getLocation(ScreenPosition screenPosition)
getLocation in class AbstractMapDisplaypublic Location getLocationFromObjectPosition(float x, float y)
getLocationFromObjectPosition in class AbstractMapDisplaypublic float[] getInnerObjectFromLocation(Location location)
getInnerObjectFromLocation in class AbstractMapDisplaypublic ScreenPosition getScreenPosition(Location location)
getScreenPosition in class AbstractMapDisplaypublic ScreenPosition getScreenPositionFloat(Location location)
getScreenPositionFloat in class AbstractMapDisplay@Deprecated public float[] getScreenPositionFromLocation(Location location)
getScreenPositionFromLocation in class AbstractMapDisplaypublic processing.core.PGraphics getInnerPG()
getInnerPG in class AbstractMapDisplaypublic processing.core.PGraphics getOuterPG()
getOuterPG in class AbstractMapDisplayprotected void postDraw()
draw(). May be implemented in sub-classes to handle drawing on outerPG.public void draw()
draw in class AbstractMapDisplaypublic void setBackgroundColor(java.lang.Integer color)
setBackgroundColor in class AbstractMapDisplaycolor - Color for the background canvas. Can be semi-transparent. If null it is not used.protected java.util.Vector getVisibleKeys(processing.core.PGraphics pg)
protected TileLoader createTileLoader(Coordinate coord)
createTileLoader in class AbstractMapDisplay