public class TileManager extends Object
Modifier and Type | Class and Description |
---|---|
static class |
TileManager.TileManagerException
An exception that is thrown when there is an error with an
TileManager operation. |
static class |
TileManager.TileOptions
Contains options that are used in generating the returned tile image.
|
Modifier and Type | Field and Description |
---|---|
static int |
TILE_DEFAULT_OPACITY
The default tile opacity.
|
static int |
TILE_DEFAULT_PEN_WIDTH
The default tile pen width in pixels.
|
static int |
TILE_FRC_LEVEL_1
First class roads, such as national highway network roads.
|
static int |
TILE_FRC_LEVEL_2
Second class roads, such as state highway network roads.
|
static int |
TILE_FRC_LEVEL_3
Third class roads, such as state interconnecting network roads.
|
static int |
TILE_FRC_LEVEL_4
Fourth class roads, such as major connecting roads.
|
static int |
TILE_FRC_LEVEL_5
Fifth class roads, such as minor roads connecting suburbs.
|
static int |
TILE_FRC_LEVEL_6
Sixth class roads, such as destination and destination collector roads.
|
static int |
TILE_FRC_LEVEL_7
Seventh class roads, such as destination dead-end roads.
|
static int |
TILE_FRC_LEVEL_ALL
Report all road types.
|
Modifier and Type | Method and Description |
---|---|
static String |
geoPointToQuadKey(GeoPoint point,
int zoomLevel)
Converts a
GeoPoint object and zoom level to a quad key value. |
TrafficTilesConfig |
getConfiguration()
Gets the
TileManager configuration. |
String |
getTileUrl(int x,
int y,
int zoom)
Creates a url to obtain a tile bitmap.
|
String |
getTileUrl(int x,
int y,
int zoom,
TileManager.TileOptions options)
Retrieves a URL to obtain a traffic tile bitmap using center position and zoom level.
|
String |
getTileUrl(String quadKey,
TileManager.TileOptions options)
Retrieves a URL that can be used to obtain a traffic tile bitmap using a virtual earth quad key.
|
static GeoPoint |
quadKeyToGeoPoint(String quadKey)
Converts the specified quad key into a
GeoPoint instance with
latitude/longitude values. |
boolean |
showTrafficTiles(int zoom)
Gets a value indicating whether the traffic tiles should be displayed on
specified zoom level.
|
public static final int TILE_DEFAULT_OPACITY
public static final int TILE_DEFAULT_PEN_WIDTH
public static final int TILE_FRC_LEVEL_1
public static final int TILE_FRC_LEVEL_2
public static final int TILE_FRC_LEVEL_3
public static final int TILE_FRC_LEVEL_4
public static final int TILE_FRC_LEVEL_5
public static final int TILE_FRC_LEVEL_6
public static final int TILE_FRC_LEVEL_7
public static final int TILE_FRC_LEVEL_ALL
public TrafficTilesConfig getConfiguration()
TileManager
configuration.TrafficTilesConfig
.public final boolean showTrafficTiles(int zoom)
zoom
- Target zoom level.public final String getTileUrl(int x, int y, int zoom)
TileManager.getTileUrl(int, int, int, com.inrix.sdk.TileManager.TileOptions)
that accepts TileOptions
as parameter.x
- Traffic tile X coordinate.y
- Traffic tile Y coordinate.zoom
- Current zoom level.TileManager.TileManagerException
- when one of the specified arguments is invalid.public String getTileUrl(int x, int y, int zoom, TileManager.TileOptions options)
x
- Traffic tile X coordinate.y
- Traffic tile Y coordinate.zoom
- An integer between 0 and 21 where 0 is zoomed out to cover the
full globe, and 21 is the maximum zoom level. Note that some
zoom levels may be too high or too low for this method to
return an image.options
- The tile configuration options.TileManager.TileManagerException
- when any of the specified arguments is invalid.public final String getTileUrl(String quadKey, TileManager.TileOptions options)
quadKey
- A virtual earth quad key to generate a resulting 256 x 256
tile which represents the described area.options
- The tile configuration options.TileManager.TileManagerException
- when quadkey is invalid or options contains invalid parameters.public static GeoPoint quadKeyToGeoPoint(String quadKey)
GeoPoint
instance with
latitude/longitude values.quadKey
- The quad keypublic static String geoPointToQuadKey(GeoPoint point, int zoomLevel)
GeoPoint
object and zoom level to a quad key value.point
- The GeoPoint value to be converted.zoomLevel
- An integer between 0 and 21 where 0 is zoomed out to cover the
full globe, and 21 is the maximum zoom level.Copyright © 2013-2018 INRIX, Inc. All Rights Reserved.