public class MapServer
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static double |
ROOT_LRLAT
The root upper left/lower right longitudes and latitudes represent the bounding box of
the root tile, as the images in the img/ folder are scraped.
|
static double |
ROOT_LRLON
The root upper left/lower right longitudes and latitudes represent the bounding box of
the root tile, as the images in the img/ folder are scraped.
|
static double |
ROOT_ULLAT
The root upper left/lower right longitudes and latitudes represent the bounding box of
the root tile, as the images in the img/ folder are scraped.
|
static double |
ROOT_ULLON
The root upper left/lower right longitudes and latitudes represent the bounding box of
the root tile, as the images in the img/ folder are scraped.
|
static java.awt.Color |
ROUTE_STROKE_COLOR
Route stroke information: Cyan with half transparency.
|
static float |
ROUTE_STROKE_WIDTH_PX
Route stroke information: typically roads are not more than 5px wide.
|
static int |
TILE_SIZE
Each tile is 256x256 pixels.
|
| Constructor and Description |
|---|
MapServer() |
| Modifier and Type | Method and Description |
|---|---|
static void |
clearRoute()
Clear the current found route, if it exists.
|
static java.util.List<java.util.Map<java.lang.String,java.lang.Object>> |
getLocations(java.lang.String locationName)
Collect all locations that match a cleaned
locationName, and return
information about each node that matches. |
static java.util.List<java.lang.String> |
getLocationsByPrefix(java.lang.String prefix)
In linear time, collect all the names of OSM locations that prefix-match the query string.
|
static void |
initialize()
Place any initialization statements that will be run before the server main loop here.
|
static void |
main(java.lang.String[] args) |
public static final double ROOT_ULLAT
public static final double ROOT_ULLON
public static final double ROOT_LRLAT
public static final double ROOT_LRLON
public static final int TILE_SIZE
public static final float ROUTE_STROKE_WIDTH_PX
public static final java.awt.Color ROUTE_STROKE_COLOR
public static void initialize()
public static void main(java.lang.String[] args)
public static void clearRoute()
public static java.util.List<java.lang.String> getLocationsByPrefix(java.lang.String prefix)
prefix - Prefix string to be searched for. Could be any case, with our without
punctuation.List of the full names of locations whose cleaned name matches the
cleaned prefix.public static java.util.List<java.util.Map<java.lang.String,java.lang.Object>> getLocations(java.lang.String locationName)
locationName, and return
information about each node that matches.locationName - A full name of a location searched for.locationName, and each location is a map of parameters for the Json
response as specified: