com.nutiteq.maps
Class JaredOpenStreetMap

java.lang.Object
  extended by com.nutiteq.maps.BaseMap
      extended by com.nutiteq.maps.projections.EPSG3785
          extended by 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.projections.EPSG3785
mapPosToWgs, wgsToMapPos
 
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
 

Constructor Detail

JaredOpenStreetMap

public JaredOpenStreetMap(int tileSize,
                          int minZoom,
                          int maxZoom)
Create map with tiles located at jar root.

Parameters:
tileSize - map tile size
minZoom - minimum zoom for the map
maxZoom - 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 files
tileSize - map tile size
minZoom - minimum zoom for the map
maxZoom - maximum zoom for the map

JaredOpenStreetMap

public JaredOpenStreetMap(Copyright copyright,
                          java.lang.String tilesLocationPath,
                          int tileSize,
                          int minZoom,
                          int maxZoom)
Method Detail

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 map
mapY - tile top-left corner x on pixel map
zoom - zoom level
Returns:
path for the tile image. Could be URL, file path or jar resource path