|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.nutiteq.maps.BaseMap
public abstract class BaseMap
Base class for maps that handles some common logic between different map types.
Handles properties:
Default map size, map bounds and zoom handling is implemented based on OpenStreetMap system. Feel free to override these based on your specific needs.
| Constructor Summary | |
|---|---|
BaseMap(Copyright copyright,
int tileSize,
int minZoom,
int maxZoom)
|
|
BaseMap(java.lang.String copyright,
int tileSize,
int minZoom,
int maxZoom)
|
|
| Method Summary | |
|---|---|
void |
addTileOverlay(MapTileOverlay overlay)
Add overlay for displaying tiles with additional data on map tiles. |
Copyright |
getCopyright()
Map copyright string painted on screen |
com.nutiteq.task.Task |
getInitializationTask()
Get task that will be executed after this is set with BasicMapComponent.setMap(GeoMap) |
int |
getMapHeight(int zoom)
Get map height for given zoom level. |
int |
getMapWidth(int zoom)
Get map width for given zoom level. |
int |
getMaxZoom()
Maximum zoom level for implementing map. |
int |
getMinZoom()
Minimum zoom level for implementing map. |
com.nutiteq.wrappers.Image |
getMissingTileImage()
Get image used for showing missing image. |
ZoomRange |
getZoomRange()
Get zoom range for the map |
TileMapBounds |
getTileMapBounds(int zoom)
Get map bounds for specified zoom level. |
MapTileOverlay |
getTileOverlay()
Get overlay used for map |
int |
getTileSize()
Get tile size for implemented map |
void |
setCopyright(Copyright copyright)
|
void |
setMissingTileImage(com.nutiteq.wrappers.Image missingTile)
Set image used for missing tiles |
MapPos |
zoom(MapPos middlePoint,
int zoomSteps)
Handles zoom for display middle point (as default the red cross on screen) by assuming that map size between single zoom levels is always magnitude of two (next map size is two times smaller or bigger). |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.nutiteq.maps.GeoMap |
|---|
mapPosToWgs, wgsToMapPos |
| Constructor Detail |
|---|
public BaseMap(Copyright copyright,
int tileSize,
int minZoom,
int maxZoom)
public BaseMap(java.lang.String copyright,
int tileSize,
int minZoom,
int maxZoom)
| Method Detail |
|---|
public com.nutiteq.task.Task getInitializationTask()
GeoMapBasicMapComponent.setMap(GeoMap)
getInitializationTask in interface GeoMappublic Copyright getCopyright()
GeoMap
getCopyright in interface GeoMappublic int getTileSize()
GeoMap
getTileSize in interface GeoMappublic int getMaxZoom()
GeoMap
getMaxZoom in interface GeoMappublic int getMinZoom()
GeoMap
getMinZoom in interface GeoMappublic ZoomRange getZoomRange()
GeoMap
getZoomRange in interface GeoMap
public MapPos zoom(MapPos middlePoint,
int zoomSteps)
Handles zoom for display middle point (as default the red cross on screen) by assuming that map size between single zoom levels is always magnitude of two (next map size is two times smaller or bigger).
For example for OpenStreetMap zoom level 0 world size is 256x256 pixels and center point will be in 128x128. If zoomed in one level world size will be 512x512 pixels and center point will be at 256x256.
zoom in interface GeoMapmiddlePoint - map position on witch to perform zoom actionzoomSteps - zoom steps needed to handle
public TileMapBounds getTileMapBounds(int zoom)
getTileMapBounds in interface GeoMapzoom - zoom level for witch to get map bounds
public int getMapHeight(int zoom)
getMapHeight in interface GeoMapzoom - zoom level for witch to get map height
public int getMapWidth(int zoom)
getMapWidth in interface GeoMapzoom - zoom level for witch to get map width
public void addTileOverlay(MapTileOverlay overlay)
GeoMap
addTileOverlay in interface GeoMapoverlay - overlay to be used for additional datapublic MapTileOverlay getTileOverlay()
GeoMap
getTileOverlay in interface GeoMappublic void setMissingTileImage(com.nutiteq.wrappers.Image missingTile)
GeoMap
setMissingTileImage in interface GeoMapmissingTile - image usedpublic com.nutiteq.wrappers.Image getMissingTileImage()
GeoMap
getMissingTileImage in interface GeoMappublic void setCopyright(Copyright copyright)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||