com.nutiteq.maps
Class JaredOpenStreetMap
java.lang.Object
com.nutiteq.maps.BaseMap
com.nutiteq.maps.projections.EPSG3785
com.nutiteq.maps.JaredOpenStreetMap
- All Implemented Interfaces:
- GeoMap, Projection, UnstreamedMap
public class JaredOpenStreetMap
- extends EPSG3785
- implements GeoMap, UnstreamedMap
Implementation for map that uses OpenStreetMap tiles from jar. File names are
put together as
/{path to tiles in jar}/(zoom level)_(tile x)_(tile y).png
|
Constructor Summary |
JaredOpenStreetMap(Copyright copyright,
java.lang.String tilesLocationPath,
int tileSize,
int minZoom,
int maxZoom)
|
JaredOpenStreetMap(int tileSize,
int minZoom,
int maxZoom)
Create map with tiles located at jar root. |
JaredOpenStreetMap(java.lang.String tilesLocationPath,
int tileSize,
int minZoom,
int maxZoom)
Create map with tiles in defined path. |
|
Method Summary |
java.lang.String |
buildPath(int mapX,
int mapY,
int zoom)
Build path for the tile image. |
| Methods inherited from class com.nutiteq.maps.BaseMap |
addTileOverlay, getCopyright, getMapHeight, getMapWidth, getMaxZoom, getMinZoom, getMissingTileImage, getZoomRange, getTileMapBounds, getTileOverlay, getTileSize, setCopyright, setMissingTileImage, zoom |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.nutiteq.maps.GeoMap |
addTileOverlay, getCopyright, getMapHeight, getMapWidth, getMaxZoom, getMinZoom, getMissingTileImage, getZoomRange, getTileMapBounds, getTileOverlay, getTileSize, mapPosToWgs, setMissingTileImage, zoom, wgsToMapPos |
JaredOpenStreetMap
public JaredOpenStreetMap(int tileSize,
int minZoom,
int maxZoom)
- Create map with tiles located at jar root.
- Parameters:
tileSize - map tile sizeminZoom - minimum zoom for the mapmaxZoom - maximum zoom for the map
JaredOpenStreetMap
public JaredOpenStreetMap(java.lang.String tilesLocationPath,
int tileSize,
int minZoom,
int maxZoom)
- Create map with tiles in defined path. For example:
/resources/map_tiles/.
- Parameters:
tilesLocationPath - path to directory for filestileSize - map tile sizeminZoom - minimum zoom for the mapmaxZoom - maximum zoom for the map
JaredOpenStreetMap
public JaredOpenStreetMap(Copyright copyright,
java.lang.String tilesLocationPath,
int tileSize,
int minZoom,
int maxZoom)
buildPath
public java.lang.String buildPath(int mapX,
int mapY,
int zoom)
- Description copied from interface:
UnstreamedMap
- Build path for the tile image. Images reading from network and application
jar is supported.
- Specified by:
buildPath in interface UnstreamedMap
- Parameters:
mapX - tile top-left corner x on pixel mapmapY - tile top-left corner x on pixel mapzoom - zoom level
- Returns:
- path for the tile image. Could be URL, file path or jar resource
path