public final class MapPane extends javafx.scene.layout.Pane implements MapControlable
heightProperty, maxHeightProperty, maxWidthProperty, minHeightProperty, minWidthProperty, paddingProperty, prefHeightProperty, prefWidthProperty, snapToPixelProperty, widthPropertyimpl_traversalEngineProperty, needsLayoutPropertyblendModeProperty, boundsInLocalProperty, boundsInParentProperty, cacheHintProperty, cacheProperty, clipProperty, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectProperty, eventDispatcherProperty, focusedProperty, focusTraversableProperty, hoverProperty, idProperty, impl_showMnemonicsProperty, inputMethodRequestsProperty, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParentTransformProperty, localToSceneTransformProperty, managedProperty, mouseTransparentProperty, onContextMenuRequestedProperty, onDragDetectedProperty, onDragDoneProperty, onDragDroppedProperty, onDragEnteredProperty, onDragExitedProperty, onDragOverProperty, onInputMethodTextChangedProperty, onKeyPressedProperty, onKeyReleasedProperty, onKeyTypedProperty, onMouseClickedProperty, onMouseDragEnteredProperty, onMouseDragExitedProperty, onMouseDraggedProperty, onMouseDragOverProperty, onMouseDragReleasedProperty, onMouseEnteredProperty, onMouseExitedProperty, onMouseMovedProperty, onMousePressedProperty, onMouseReleasedProperty, onRotateProperty, onRotationFinishedProperty, onRotationStartedProperty, onScrollFinishedProperty, onScrollProperty, onScrollStartedProperty, onSwipeDownProperty, onSwipeLeftProperty, onSwipeRightProperty, onSwipeUpProperty, onTouchMovedProperty, onTouchPressedProperty, onTouchReleasedProperty, onTouchStationaryProperty, onZoomFinishedProperty, onZoomProperty, onZoomStartedProperty, opacityProperty, parentProperty, pickOnBoundsProperty, pressedProperty, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, styleProperty, translateXProperty, translateYProperty, translateZProperty, visibleProperty| Constructor and Description |
|---|
MapPane(TileSource ts) |
MapPane(TileSource tileSource,
int x,
int y,
int width,
int height,
int zoom) |
| Modifier and Type | Method and Description |
|---|---|
void |
addMapLine(MapLineable line) |
void |
addMapMarker(MapMarkable marker) |
void |
addMapOverlay(MapOverlayable overlay) |
void |
addMapPolygon(MapPolygonable polygon) |
void |
adjustCursorLocationText() |
protected void |
buildZoomControls() |
java.awt.Point |
getCenter()
This method returns the center of the map as a point.
|
Coordinate |
getCenterCoordinate()
Calculates the latitude/longitude coordinate of the center of the currently displayed map area.
|
Coordinate |
getCoordinate(int mapPointX,
int mapPointY)
Converts the relative pixel coordinate (regarding the top left corner of the displayed map) into a latitude /
longitude coordinate
|
Coordinate |
getCoordinate(java.awt.Point mapPoint) |
int |
getMapHeight() |
java.util.List<MapMarkable> |
getMapMarkerList() |
java.awt.Point |
getMapPoint(Coordinate coord)
Calculates the position on the map of a given coordinate
|
java.awt.Point |
getMapPoint(double lat,
double lon,
boolean checkOutside) |
java.util.List<MapPolygonable> |
getMapRectangleList() |
int |
getMapWidth() |
int |
getMapX() |
int |
getMapY() |
javafx.scene.Group |
getTilesGroup() |
TileSource |
getTileSource() |
int |
getZoom() |
boolean |
getZoomContolsVisible() |
boolean |
isMapPolygonsVisible() |
boolean |
isMapRoutesVisible() |
boolean |
isMapTrailsVisible() |
boolean |
isMapVehiclesVisible() |
boolean |
isShowZoomControls() |
void |
moveMap(int x,
int y)
Moves the map to the given coordinates so that x and y is in the center.
|
void |
removeMapMarker(MapLineable line) |
void |
removeMapMarker(MapMarkable marker) |
void |
removeMapOverlay(MapOverlayable overlay) |
void |
removeMapPolygon(MapPolygonable polygon) |
protected void |
renderAttribution() |
protected void |
renderControl() |
protected boolean |
renderMap() |
protected void |
renderMarkers() |
protected void |
renderOverlays() |
protected void |
renderPolygons() |
void |
setCursorLocationText(double x,
double y) |
void |
setCursorLocationVisible(boolean val) |
void |
setDisplayPosition(int x,
int y,
int zoom) |
void |
setDisplayPosition(java.awt.Point mapPoint,
int x,
int y,
int zoom) |
void |
setDisplayPositionByLatLon(double lat,
double lon) |
void |
setDisplayPositionByLatLon(double lat,
double lon,
int zoom) |
void |
setDisplayPositionByLatLon(java.awt.Point mapPoint,
double lat,
double lon,
int zoom) |
void |
setDisplayToFitMapMarkers() |
void |
setDisplayToFitMapRectangle() |
void |
setMapBounds(int x,
int y,
int width,
int height) |
void |
setMapHeight(double val) |
void |
setMapMarkerList(java.util.List<MapMarkable> mapMarkerList) |
void |
setMapMarkerVisible(boolean mapMarkersVisible) |
void |
setMapPolygonList(java.util.List<MapPolygonable> mapPolygonList) |
void |
setMapPolygonsVisible(boolean val) |
void |
setMapRoutesVisible(boolean val) |
void |
setMapTrailsVisible(boolean val) |
void |
setMapVehiclesVisible(boolean val) |
void |
setMapWidth(double val) |
void |
setMapX(int val) |
void |
setMapY(int val) |
void |
setMonochromeMode(boolean val) |
void |
setShowZoomControls(boolean val) |
void |
setTileGridVisible(boolean val) |
void |
setTileSource(TileSource tileSource) |
void |
setTrailTime(int val) |
void |
setZoom(int zoom) |
void |
setZoom(int zoom,
java.awt.Point mapPoint) |
void |
setZoomContolsVisible(boolean visible) |
protected void |
zoomChanged(int oldZoom) |
void |
zoomIn() |
void |
zoomIn(java.awt.Point mapPoint) |
void |
zoomOut() |
void |
zoomOut(java.awt.Point mapPoint) |
computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, getHeight, getInsets, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getPadding, getPrefHeight, getPrefWidth, getWidth, heightProperty, impl_computeContains, impl_computeGeomBounds, impl_computeLayoutBounds, impl_createPGNode, impl_CSS_STYLEABLES, impl_getBackgroundFills, impl_getPositionShape, impl_getScaleShape, impl_getShape, impl_getStyleableProperties, impl_notifyLayoutBoundsChanged, impl_pickNodeLocal, impl_pickNodeLocal, impl_setBackgroundFills, impl_setPositionShape, impl_setScaleShape, impl_setShape, impl_updatePG, insets, isResizable, isSnapToPixel, layoutInArea, layoutInArea, layoutInArea, maxHeight, maxHeightProperty, maxWidth, maxWidthProperty, minHeight, minHeightProperty, minWidth, minWidthProperty, paddingProperty, positionInArea, positionInArea, prefHeight, prefHeightProperty, prefWidth, prefWidthProperty, resize, setHeight, setMaxHeight, setMaxSize, setMaxWidth, setMinHeight, setMinSize, setMinWidth, setPadding, setPrefHeight, setPrefSize, setPrefWidth, setSnapToPixel, setWidth, snapPosition, snapSize, snapSpace, snapToPixelProperty, widthPropertygetBaselineOffset, getChildrenUnmodifiable, getImpl_traversalEngine, getManagedChildren, getStylesheets, impl_cssResetInitialValues, impl_geomChanged, impl_getAllParentStylesheets, impl_processCSS, impl_processMXNode, impl_traversalEngineProperty, isNeedsLayout, layout, layoutChildren, lookup, needsLayoutProperty, requestLayout, setImpl_traversalEngine, setNeedsLayoutaddEventFilter, addEventHandler, autosize, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, contains, contains, containsBounds, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectProperty, eventDispatcherProperty, fireEvent, focusedProperty, focusTraversableProperty, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, getContentBias, getCursor, getDepthTest, getEffect, getEventDispatcher, getId, getInputMethodRequests, getLayoutBounds, getLayoutX, getLayoutY, getLocalToParentTransform, getLocalToSceneTransform, getOnContextMenuRequested, getOnDragDetected, getOnDragDone, getOnDragDropped, getOnDragEntered, getOnDragExited, getOnDragOver, getOnInputMethodTextChanged, getOnKeyPressed, getOnKeyReleased, getOnKeyTyped, getOnMouseClicked, getOnMouseDragEntered, getOnMouseDragExited, getOnMouseDragged, getOnMouseDragOver, getOnMouseDragReleased, getOnMouseEntered, getOnMouseExited, getOnMouseMoved, getOnMousePressed, getOnMouseReleased, getOnRotate, getOnRotationFinished, getOnRotationStarted, getOnScroll, getOnScrollFinished, getOnScrollStarted, getOnSwipeDown, getOnSwipeLeft, getOnSwipeRight, getOnSwipeUp, getOnTouchMoved, getOnTouchPressed, getOnTouchReleased, getOnTouchStationary, getOnZoom, getOnZoomFinished, getOnZoomStarted, getOpacity, getParent, getProperties, getRotate, getRotationAxis, getScaleX, getScaleY, getScaleZ, getScene, getStyle, getStyleClass, getTransforms, getTranslateX, getTranslateY, getTranslateZ, getUserData, hasProperties, hoverProperty, idProperty, impl_clearDirty, impl_createStyleHelper, impl_cssGetCursorInitialValue, impl_cssGetFocusTraversableInitialValue, impl_getLeafTransform, impl_getPGNode, impl_getPivotX, impl_getPivotY, impl_getPivotZ, impl_getPseudoClassState, impl_getStyleable, impl_getStyleHelper, impl_getStyleMap, impl_hasTransforms, impl_intersects, impl_isDirty, impl_isDirtyEmpty, impl_isShowMnemonics, impl_isTreeVisible, impl_layoutBoundsChanged, impl_markDirty, impl_pickNode, impl_pickNode, impl_pseudoClassStateChanged, impl_reapplyCSS, impl_setShowMnemonics, impl_setStyleMap, impl_showMnemonicsProperty, impl_syncPGNode, impl_transformsChanged, impl_traverse, inputMethodRequestsProperty, intersects, intersects, isCache, isDisable, isDisabled, isFocused, isFocusTraversable, isHover, isManaged, isMouseTransparent, isPickOnBounds, isPressed, isVisible, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParent, localToParent, localToParent, localToParentTransformProperty, localToScene, localToScene, localToScene, localToSceneTransformProperty, lookupAll, managedProperty, mouseTransparentProperty, onContextMenuRequestedProperty, onDragDetectedProperty, onDragDoneProperty, onDragDroppedProperty, onDragEnteredProperty, onDragExitedProperty, onDragOverProperty, onInputMethodTextChangedProperty, onKeyPressedProperty, onKeyReleasedProperty, onKeyTypedProperty, onMouseClickedProperty, onMouseDragEnteredProperty, onMouseDragExitedProperty, onMouseDraggedProperty, onMouseDragOverProperty, onMouseDragReleasedProperty, onMouseEnteredProperty, onMouseExitedProperty, onMouseMovedProperty, onMousePressedProperty, onMouseReleasedProperty, onRotateProperty, onRotationFinishedProperty, onRotationStartedProperty, onScrollFinishedProperty, onScrollProperty, onScrollStartedProperty, onSwipeDownProperty, onSwipeLeftProperty, onSwipeRightProperty, onSwipeUpProperty, onTouchMovedProperty, onTouchPressedProperty, onTouchReleasedProperty, onTouchStationaryProperty, onZoomFinishedProperty, onZoomProperty, onZoomStartedProperty, opacityProperty, parentProperty, parentToLocal, parentToLocal, parentToLocal, pickOnBoundsProperty, pressedProperty, relocate, removeEventFilter, removeEventHandler, requestFocus, resizeRelocate, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, sceneToLocal, sceneToLocal, sceneToLocal, setBlendMode, setCache, setCacheHint, setClip, setCursor, setDepthTest, setDisable, setDisabled, setEffect, setEventDispatcher, setEventHandler, setFocused, setFocusTraversable, setHover, setId, setInputMethodRequests, setLayoutX, setLayoutY, setManaged, setMouseTransparent, setOnContextMenuRequested, setOnDragDetected, setOnDragDone, setOnDragDropped, setOnDragEntered, setOnDragExited, setOnDragOver, setOnInputMethodTextChanged, setOnKeyPressed, setOnKeyReleased, setOnKeyTyped, setOnMouseClicked, setOnMouseDragEntered, setOnMouseDragExited, setOnMouseDragged, setOnMouseDragOver, setOnMouseDragReleased, setOnMouseEntered, setOnMouseExited, setOnMouseMoved, setOnMousePressed, setOnMouseReleased, setOnRotate, setOnRotationFinished, setOnRotationStarted, setOnScroll, setOnScrollFinished, setOnScrollStarted, setOnSwipeDown, setOnSwipeLeft, setOnSwipeRight, setOnSwipeUp, setOnTouchMoved, setOnTouchPressed, setOnTouchReleased, setOnTouchStationary, setOnZoom, setOnZoomFinished, setOnZoomStarted, setOpacity, setPickOnBounds, setPressed, setRotate, setRotationAxis, setScaleX, setScaleY, setScaleZ, setStyle, setTranslateX, setTranslateY, setTranslateZ, setUserData, setVisible, snapshot, snapshot, startDragAndDrop, startFullDrag, styleProperty, toBack, toFront, toString, translateXProperty, translateYProperty, translateZProperty, visiblePropertypublic MapPane(TileSource ts)
public MapPane(TileSource tileSource, int x, int y, int width, int height, int zoom)
public void setCursorLocationText(double x,
double y)
setCursorLocationText in interface MapControlablepublic void adjustCursorLocationText()
adjustCursorLocationText in interface MapControlableprotected void buildZoomControls()
public void setMapBounds(int x,
int y,
int width,
int height)
public void setDisplayPositionByLatLon(double lat,
double lon)
public void setDisplayPositionByLatLon(double lat,
double lon,
int zoom)
public void setDisplayPositionByLatLon(java.awt.Point mapPoint,
double lat,
double lon,
int zoom)
public void setDisplayPosition(int x,
int y,
int zoom)
public void setDisplayPosition(java.awt.Point mapPoint,
int x,
int y,
int zoom)
public void setDisplayToFitMapMarkers()
public void setDisplayToFitMapRectangle()
public Coordinate getCenterCoordinate()
public Coordinate getCoordinate(java.awt.Point mapPoint)
public Coordinate getCoordinate(int mapPointX, int mapPointY)
MapControlablegetCoordinate in interface MapControlablepublic java.awt.Point getMapPoint(double lat,
double lon,
boolean checkOutside)
getMapPoint in interface MapControlablepublic java.awt.Point getMapPoint(Coordinate coord)
MapControlablegetMapPoint in interface MapControlablepublic void moveMap(int x,
int y)
MapControlablemoveMap in interface MapControlablepublic void setZoom(int zoom,
java.awt.Point mapPoint)
protected void zoomChanged(int oldZoom)
public void setMapMarkerVisible(boolean mapMarkersVisible)
public void setMapMarkerList(java.util.List<MapMarkable> mapMarkerList)
public java.util.List<MapMarkable> getMapMarkerList()
public void removeMapOverlay(MapOverlayable overlay)
public void addMapOverlay(MapOverlayable overlay)
public void setMapPolygonList(java.util.List<MapPolygonable> mapPolygonList)
public java.util.List<MapPolygonable> getMapRectangleList()
public void addMapLine(MapLineable line)
public void removeMapMarker(MapLineable line)
public void addMapMarker(MapMarkable marker)
public void removeMapMarker(MapMarkable marker)
public void addMapPolygon(MapPolygonable polygon)
public void removeMapPolygon(MapPolygonable polygon)
public void setZoomContolsVisible(boolean visible)
public boolean getZoomContolsVisible()
public void setTileSource(TileSource tileSource)
protected void renderControl()
protected boolean renderMap()
protected void renderOverlays()
protected void renderPolygons()
protected void renderMarkers()
protected void renderAttribution()
public void setMapX(int val)
public int getMapX()
getMapX in interface MapControlablepublic void setMapY(int val)
public int getMapY()
getMapY in interface MapControlablepublic void setMapWidth(double val)
public int getMapWidth()
getMapWidth in interface MapControlablepublic void setMapHeight(double val)
public int getMapHeight()
getMapHeight in interface MapControlablepublic void setTrailTime(int val)
public void setMapVehiclesVisible(boolean val)
public boolean isMapVehiclesVisible()
public void setMapPolygonsVisible(boolean val)
public boolean isMapPolygonsVisible()
public void setMapRoutesVisible(boolean val)
public boolean isMapRoutesVisible()
public void setShowZoomControls(boolean val)
public boolean isShowZoomControls()
public void setMapTrailsVisible(boolean val)
public boolean isMapTrailsVisible()
public void setMonochromeMode(boolean val)
public void setTileGridVisible(boolean val)
public void setCursorLocationVisible(boolean val)
public TileSource getTileSource()
getTileSource in interface MapControlablepublic javafx.scene.Group getTilesGroup()
getTilesGroup in interface MapControlablepublic java.awt.Point getCenter()
MapControlablegetCenter in interface MapControlable