org.openstreetmap.gui.jmapviewer
Class JMapViewer

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by org.openstreetmap.gui.jmapviewer.JMapViewer
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, TileLoaderListener
Direct Known Subclasses:
SlippyMapBBoxChooser, TileSelectionBBoxChooser.TileBoundsMapView

public class JMapViewer
extends javax.swing.JPanel
implements TileLoaderListener

Provides a simple panel that displays pre-rendered map tiles loaded from the OpenStreetMap project.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
protected  AttributionSupport attribution
           
protected  java.awt.Point center
          x- and y-position of the center of this map-panel on the world map denoted in screen pixel regarding the current zoom level.
protected  javax.swing.event.EventListenerList listenerList
           
protected  java.util.List<MapMarker> mapMarkerList
           
protected  boolean mapMarkersVisible
           
protected  java.util.List<MapPolygon> mapPolygonList
           
protected  boolean mapPolygonsVisible
           
protected  java.util.List<MapRectangle> mapRectangleList
           
protected  boolean mapRectanglesVisible
           
static int MAX_ZOOM
           
static int MIN_ZOOM
           
protected static java.awt.Point[] move
          Vectors for clock-wise tile painting
private static long serialVersionUID
           
protected  TileController tileController
           
protected  boolean tileGridVisible
           
private  TileSource tileSource
           
protected  int zoom
          Current zoom level
protected  javax.swing.JButton zoomInButton
           
protected  javax.swing.JButton zoomOutButton
           
protected  javax.swing.JSlider zoomSlider
           
 
Fields inherited from class javax.swing.JComponent
accessibleContext, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
JMapViewer()
          Creates a standard JMapViewer instance that can be controlled via mouse: hold right mouse button for moving, double click left mouse button or use mouse wheel for zooming.
JMapViewer(TileCache tileCache, int downloadThreadCount)
           
 
Method Summary
 void addJMVListener(JMapViewerEventListener listener)
           
 void addMapMarker(MapMarker marker)
           
 void addMapPolygon(MapPolygon polygon)
           
 void addMapRectangle(MapRectangle rectangle)
           
(package private)  void fireJMVEvent(JMVCommandEvent evt)
          Send an update to all objects registered with viewer
 java.awt.Point getCenter()
           
 java.util.List<MapMarker> getMapMarkerList()
           
 boolean getMapMarkersVisible()
           
 java.util.List<MapPolygon> getMapPolygonList()
           
 java.awt.Point getMapPosition(Coordinate coord)
          Calculates the position on the map of a given coordinate
 java.awt.Point getMapPosition(Coordinate coord, boolean checkOutside)
          Calculates the position on the map of a given coordinate
 java.awt.Point getMapPosition(double lat, double lon)
          Calculates the position on the map of a given coordinate
 java.awt.Point getMapPosition(double lat, double lon, boolean checkOutside)
          Calculates the position on the map of a given coordinate
 java.util.List<MapRectangle> getMapRectangleList()
           
 double getMeterPerPixel()
          Gets the meter per pixel.
 Coordinate getPosition()
          Calculates the latitude/longitude coordinate of the center of the currently displayed map area.
 Coordinate getPosition(int mapPointX, int mapPointY)
          Converts the relative pixel coordinate (regarding the top left corner of the displayed map) into a latitude / longitude coordinate
 Coordinate getPosition(java.awt.Point mapPoint)
          Converts the relative pixel coordinate (regarding the top left corner of the displayed map) into a latitude / longitude coordinate
 TileCache getTileCache()
          Return tile information caching class
 java.lang.String getToolTipText(java.awt.event.MouseEvent event)
           
 int getZoom()
           
 boolean getZoomContolsVisible()
           
protected  void initializeZoomSlider()
           
 boolean isMapPolygonsVisible()
           
 boolean isMapRectanglesVisible()
           
 boolean isTileGridVisible()
           
 void moveMap(int x, int y)
          Moves the visible map pane.
protected  void paintComponent(java.awt.Graphics g)
           
protected  void paintMarker(java.awt.Graphics g, MapMarker marker)
          Paint a single marker.
protected  void paintPolygon(java.awt.Graphics g, MapPolygon polygon)
          Paint a single polygon.
protected  void paintRectangle(java.awt.Graphics g, MapRectangle rectangle)
          Paint a single rectangle.
 void removeAllMapMarkers()
           
 void removeAllMapPolygons()
           
 void removeAllMapRectangles()
           
 void removeJMVListener(JMapViewerEventListener listener)
           
 void removeMapMarker(MapMarker marker)
           
 void removeMapPolygon(MapPolygon polygon)
           
 void removeMapRectangle(MapRectangle rectangle)
           
 void setCenter(java.awt.Point center)
           
 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, int zoom)
          Changes the map pane so that it is centered on the specified coordinate at the given zoom level.
 void setDisplayPositionByLatLon(java.awt.Point mapPoint, double lat, double lon, int zoom)
          Changes the map pane so that the specified coordinate at the given zoom level is displayed on the map at the screen coordinate mapPoint.
 void setDisplayToFitMapElements(boolean markers, boolean rectangles, boolean polygons)
          Sets the displayed map pane and zoom level so that all chosen map elements are visible.
 void setDisplayToFitMapMarkers()
          Sets the displayed map pane and zoom level so that all map markers are visible.
 void setDisplayToFitMapPolygons()
          Sets the displayed map pane and zoom level so that all map polygons are visible.
 void setDisplayToFitMapRectangles()
          Sets the displayed map pane and zoom level so that all map rectangles are visible.
 void setMapMarkerList(java.util.List<MapMarker> mapMarkerList)
           
 void setMapMarkerVisible(boolean mapMarkersVisible)
          Enables or disables painting of the MapMarker
 void setMapPolygonList(java.util.List<MapPolygon> mapPolygonList)
           
 void setMapPolygonsVisible(boolean mapPolygonsVisible)
          Enables or disables painting of the MapPolygon
 void setMapRectangleList(java.util.List<MapRectangle> mapRectangleList)
           
 void setMapRectanglesVisible(boolean mapRectanglesVisible)
          Enables or disables painting of the MapRectangle
 void setTileGridVisible(boolean tileGridVisible)
           
 void setTileLoader(TileLoader loader)
           
 void setTileSource(TileSource tileSource)
           
 void setZoom(int zoom)
          Set the zoom level
 void setZoom(int zoom, java.awt.Point mapPoint)
          Set the zoom level and center point for display
 void setZoomContolsVisible(boolean visible)
           
 void tileLoadingFinished(Tile tile, boolean success)
          Will be called if a new Tile has been loaded successfully.
protected  void zoomChanged(int oldZoom)
          Every time the zoom level changes this method is called.
 void zoomIn()
          Increases the current zoom level by one
 void zoomIn(java.awt.Point mapPoint)
          Increases the current zoom level by one
 void zoomOut()
          Decreases the current zoom level by one
 void zoomOut(java.awt.Point mapPoint)
          Decreases the current zoom level by one
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

move

protected static final java.awt.Point[] move
Vectors for clock-wise tile painting


MAX_ZOOM

public static final int MAX_ZOOM
See Also:
Constant Field Values

MIN_ZOOM

public static final int MIN_ZOOM
See Also:
Constant Field Values

mapMarkerList

protected java.util.List<MapMarker> mapMarkerList

mapRectangleList

protected java.util.List<MapRectangle> mapRectangleList

mapPolygonList

protected java.util.List<MapPolygon> mapPolygonList

mapMarkersVisible

protected boolean mapMarkersVisible

mapRectanglesVisible

protected boolean mapRectanglesVisible

mapPolygonsVisible

protected boolean mapPolygonsVisible

tileGridVisible

protected boolean tileGridVisible

tileController

protected TileController tileController

center

protected java.awt.Point center
x- and y-position of the center of this map-panel on the world map denoted in screen pixel regarding the current zoom level.


zoom

protected int zoom
Current zoom level


zoomSlider

protected javax.swing.JSlider zoomSlider

zoomInButton

protected javax.swing.JButton zoomInButton

zoomOutButton

protected javax.swing.JButton zoomOutButton

tileSource

private TileSource tileSource

attribution

protected AttributionSupport attribution

listenerList

protected javax.swing.event.EventListenerList listenerList
Constructor Detail

JMapViewer

public JMapViewer()
Creates a standard JMapViewer instance that can be controlled via mouse: hold right mouse button for moving, double click left mouse button or use mouse wheel for zooming. Loaded tiles are stored the MemoryTileCache and the tile loader uses 4 parallel threads for retrieving the tiles.


JMapViewer

public JMapViewer(TileCache tileCache,
                  int downloadThreadCount)
Method Detail

getToolTipText

public java.lang.String getToolTipText(java.awt.event.MouseEvent event)
Overrides:
getToolTipText in class javax.swing.JComponent

initializeZoomSlider

protected void initializeZoomSlider()

setDisplayPositionByLatLon

public void setDisplayPositionByLatLon(double lat,
                                       double lon,
                                       int zoom)
Changes the map pane so that it is centered on the specified coordinate at the given zoom level.

Parameters:
lat - latitude of the specified coordinate
lon - longitude of the specified coordinate
zoom - MIN_ZOOM <= zoom level <= MAX_ZOOM

setDisplayPositionByLatLon

public void setDisplayPositionByLatLon(java.awt.Point mapPoint,
                                       double lat,
                                       double lon,
                                       int zoom)
Changes the map pane so that the specified coordinate at the given zoom level is displayed on the map at the screen coordinate mapPoint.

Parameters:
mapPoint - point on the map denoted in pixels where the coordinate should be set
lat - latitude of the specified coordinate
lon - longitude of the specified coordinate
zoom - MIN_ZOOM <= zoom level <= TileSource.getMaxZoom()

setDisplayPosition

public void setDisplayPosition(int x,
                               int y,
                               int zoom)

setDisplayPosition

public void setDisplayPosition(java.awt.Point mapPoint,
                               int x,
                               int y,
                               int zoom)

setDisplayToFitMapElements

public void setDisplayToFitMapElements(boolean markers,
                                       boolean rectangles,
                                       boolean polygons)
Sets the displayed map pane and zoom level so that all chosen map elements are visible.


setDisplayToFitMapMarkers

public void setDisplayToFitMapMarkers()
Sets the displayed map pane and zoom level so that all map markers are visible.


setDisplayToFitMapRectangles

public void setDisplayToFitMapRectangles()
Sets the displayed map pane and zoom level so that all map rectangles are visible.


setDisplayToFitMapPolygons

public void setDisplayToFitMapPolygons()
Sets the displayed map pane and zoom level so that all map polygons are visible.


getCenter

public java.awt.Point getCenter()
Returns:
the center

setCenter

public void setCenter(java.awt.Point center)
Parameters:
center - the center to set

getPosition

public Coordinate getPosition()
Calculates the latitude/longitude coordinate of the center of the currently displayed map area.

Returns:
latitude / longitude

getPosition

public Coordinate getPosition(java.awt.Point mapPoint)
Converts the relative pixel coordinate (regarding the top left corner of the displayed map) into a latitude / longitude coordinate

Parameters:
mapPoint - relative pixel coordinate regarding the top left corner of the displayed map
Returns:
latitude / longitude

getPosition

public Coordinate getPosition(int mapPointX,
                              int mapPointY)
Converts the relative pixel coordinate (regarding the top left corner of the displayed map) into a latitude / longitude coordinate

Parameters:
mapPointX -
mapPointY -
Returns:
latitude / longitude

getMapPosition

public java.awt.Point getMapPosition(double lat,
                                     double lon,
                                     boolean checkOutside)
Calculates the position on the map of a given coordinate

Parameters:
lat -
lon -
checkOutside -
Returns:
point on the map or null if the point is not visible and checkOutside set to true

getMapPosition

public java.awt.Point getMapPosition(double lat,
                                     double lon)
Calculates the position on the map of a given coordinate

Parameters:
lat -
lon -
Returns:
point on the map or null if the point is not visible

getMapPosition

public java.awt.Point getMapPosition(Coordinate coord)
Calculates the position on the map of a given coordinate

Parameters:
coord -
Returns:
point on the map or null if the point is not visible

getMapPosition

public java.awt.Point getMapPosition(Coordinate coord,
                                     boolean checkOutside)
Calculates the position on the map of a given coordinate

Parameters:
coord -
Returns:
point on the map or null if the point is not visible and checkOutside set to true

getMeterPerPixel

public double getMeterPerPixel()
Gets the meter per pixel.

Returns:
the meter per pixel

paintComponent

protected void paintComponent(java.awt.Graphics g)
Overrides:
paintComponent in class javax.swing.JComponent

paintMarker

protected void paintMarker(java.awt.Graphics g,
                           MapMarker marker)
Paint a single marker.


paintRectangle

protected void paintRectangle(java.awt.Graphics g,
                              MapRectangle rectangle)
Paint a single rectangle.


paintPolygon

protected void paintPolygon(java.awt.Graphics g,
                            MapPolygon polygon)
Paint a single polygon.


moveMap

public void moveMap(int x,
                    int y)
Moves the visible map pane.

Parameters:
x - horizontal movement in pixel.
y - vertical movement in pixel

getZoom

public int getZoom()
Returns:
the current zoom level

zoomIn

public void zoomIn()
Increases the current zoom level by one


zoomIn

public void zoomIn(java.awt.Point mapPoint)
Increases the current zoom level by one


zoomOut

public void zoomOut()
Decreases the current zoom level by one


zoomOut

public void zoomOut(java.awt.Point mapPoint)
Decreases the current zoom level by one

Parameters:
mapPoint - point to choose as center for new zoom level

setZoom

public void setZoom(int zoom,
                    java.awt.Point mapPoint)
Set the zoom level and center point for display

Parameters:
zoom - new zoom level
mapPoint - point to choose as center for new zoom level

setZoom

public void setZoom(int zoom)
Set the zoom level

Parameters:
zoom - new zoom level

zoomChanged

protected void zoomChanged(int oldZoom)
Every time the zoom level changes this method is called. Override it in derived implementations for adapting zoom dependent values. The new zoom level can be obtained via getZoom().

Parameters:
oldZoom - the previous zoom level

isTileGridVisible

public boolean isTileGridVisible()

setTileGridVisible

public void setTileGridVisible(boolean tileGridVisible)

getMapMarkersVisible

public boolean getMapMarkersVisible()

setMapMarkerVisible

public void setMapMarkerVisible(boolean mapMarkersVisible)
Enables or disables painting of the MapMarker

Parameters:
mapMarkersVisible -
See Also:
addMapMarker(MapMarker), getMapMarkerList()

setMapMarkerList

public void setMapMarkerList(java.util.List<MapMarker> mapMarkerList)

getMapMarkerList

public java.util.List<MapMarker> getMapMarkerList()

setMapRectangleList

public void setMapRectangleList(java.util.List<MapRectangle> mapRectangleList)

getMapRectangleList

public java.util.List<MapRectangle> getMapRectangleList()

setMapPolygonList

public void setMapPolygonList(java.util.List<MapPolygon> mapPolygonList)

getMapPolygonList

public java.util.List<MapPolygon> getMapPolygonList()

addMapMarker

public void addMapMarker(MapMarker marker)

removeMapMarker

public void removeMapMarker(MapMarker marker)

removeAllMapMarkers

public void removeAllMapMarkers()

addMapRectangle

public void addMapRectangle(MapRectangle rectangle)

removeMapRectangle

public void removeMapRectangle(MapRectangle rectangle)

removeAllMapRectangles

public void removeAllMapRectangles()

addMapPolygon

public void addMapPolygon(MapPolygon polygon)

removeMapPolygon

public void removeMapPolygon(MapPolygon polygon)

removeAllMapPolygons

public void removeAllMapPolygons()

setZoomContolsVisible

public void setZoomContolsVisible(boolean visible)

getZoomContolsVisible

public boolean getZoomContolsVisible()

setTileSource

public void setTileSource(TileSource tileSource)

tileLoadingFinished

public void tileLoadingFinished(Tile tile,
                                boolean success)
Description copied from interface: TileLoaderListener
Will be called if a new Tile has been loaded successfully. Loaded can mean downloaded or loaded from file cache.

Specified by:
tileLoadingFinished in interface TileLoaderListener

isMapRectanglesVisible

public boolean isMapRectanglesVisible()

setMapRectanglesVisible

public void setMapRectanglesVisible(boolean mapRectanglesVisible)
Enables or disables painting of the MapRectangle

Parameters:
mapRectanglesVisible -
See Also:
addMapRectangle(MapRectangle), getMapRectangleList()

isMapPolygonsVisible

public boolean isMapPolygonsVisible()

setMapPolygonsVisible

public void setMapPolygonsVisible(boolean mapPolygonsVisible)
Enables or disables painting of the MapPolygon

Parameters:
mapPolygonsVisible -
See Also:
addMapPolygon(MapPolygon), getMapPolygonList()

getTileCache

public TileCache getTileCache()
Return tile information caching class

Specified by:
getTileCache in interface TileLoaderListener
Returns:
tile information caching class
See Also:
TileLoaderListener.getTileCache()

setTileLoader

public void setTileLoader(TileLoader loader)

addJMVListener

public void addJMVListener(JMapViewerEventListener listener)
Parameters:
listener - listener to set

removeJMVListener

public void removeJMVListener(JMapViewerEventListener listener)
Parameters:
listener - listener to remove

fireJMVEvent

void fireJMVEvent(JMVCommandEvent evt)
Send an update to all objects registered with viewer

Parameters:
event - to dispatch


JOSM