|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectus.zuercher.gpx2map.source.AbstractCachedMapSource
us.zuercher.gpx2map.source.AbstractTiledUrlMapSource
us.zuercher.gpx2map.source.dummy.DummyMapSource
public class DummyMapSource
DummyMapSource is a dummy map source. It provides the following:
MapSource
implementation.debug mode
.
Field Summary | |
---|---|
private LatLon |
nw
NW corner. |
private static List<MapSourcePropertyDescriptor> |
properties
|
private LatLon |
se
SE corner. |
Constructor Summary | |
---|---|
DummyMapSource()
Constructs a new DummyMapSource. |
Method Summary | |
---|---|
void |
downloadTiles(ProgressMeter meter)
Copies a single file via a resource URL to the cache location. |
protected int |
getColumnCount()
Gets the column count. |
Dimension |
getImageSize()
Returns the final size of the image. |
double |
getMapScale()
Returns a guess as to the map's scale. |
List<MapSourcePropertyDescriptor> |
getProperties()
Returns the property descriptors for the dummy map source. |
protected int |
getRowCount()
Gets the row count. |
protected File |
getTile(int column,
int row)
Retrieves the one-and-only cached tile file. |
Point |
mapLocationToPixel(LatLon location)
Maps the given location onto the stitched map image. |
void |
setBoundingBox(LatLon northWest,
LatLon southEast)
Sets the map bounding box. |
void |
setProperty(String name,
String value)
Simply validates that the given property name exists and, if it is a choice-based property, that a choice matching value exists. |
Methods inherited from class us.zuercher.gpx2map.source.AbstractTiledUrlMapSource |
---|
download, download, getCompressedCacheFileExtension, stitchTiles |
Methods inherited from class us.zuercher.gpx2map.source.AbstractCachedMapSource |
---|
getCacheDir, setCacheDir |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface us.zuercher.gpx2map.source.MapSource |
---|
setCacheDir, stitchTiles |
Field Detail |
---|
private static final List<MapSourcePropertyDescriptor> properties
private LatLon nw
private LatLon se
Constructor Detail |
---|
DummyMapSource()
Method Detail |
---|
protected int getColumnCount()
getColumnCount
in class AbstractTiledUrlMapSource
protected int getRowCount()
getRowCount
in class AbstractTiledUrlMapSource
protected File getTile(int column, int row)
getTile
in class AbstractTiledUrlMapSource
column
- column index, ignoredrow
- row index, ignored
public List<MapSourcePropertyDescriptor> getProperties()
getProperties
in interface MapSource
public void setProperty(String name, String value)
setProperty
in interface MapSource
name
- property namevalue
- property value
IllegalArgumentException
- if the property name is not found or
if a choice property value matching
the property value is not foundpublic void setBoundingBox(LatLon northWest, LatLon southEast)
setBoundingBox
in interface MapSource
northWest
- the northwest cornersouthEast
- the southeast cornerpublic void downloadTiles(ProgressMeter meter) throws IOException
downloadTiles
in interface MapSource
meter
- a progress meter
IOException
- if there's an error copying the filepublic Point mapLocationToPixel(LatLon location)
mapLocationToPixel
in interface MapSource
location
- the latitude/longitude to convert
public Dimension getImageSize()
getImageSize
in interface MapSource
public double getMapScale()
getMapScale
in interface MapSource
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |