public class LinkMapRequest
extends java.lang.Object
This object can be used to write the query to the link, and to read the query from the link.
Modifier and Type | Field and Description |
---|---|
protected LinkBoundingPoly[] |
boundingPolys
A series of LinkBoundingPoly objects making up polygons of
interest.
|
protected LatLonPoint |
center
The latitude/longitude of the center of the map.
|
protected int |
height
Height of the map, in pixels.
|
protected LinkProperties |
properties
Key value pairs of properties sent along with the map.
|
protected float |
scale
The scale of the map.
|
protected static float |
version
Version Number of request format.
|
protected int |
width
Width of the map, in pixels.
|
Constructor and Description |
---|
LinkMapRequest(Link link)
The constructor to use when reading the LinkMapRequest off the
link.
|
Modifier and Type | Method and Description |
---|---|
LinkBoundingPoly[] |
getBoundingPolys()
Get an array of bounding polygons.
|
LatLonPoint |
getCenter()
Get the center of the map.
|
int |
getHeight()
Get the height of map in pixels.
|
java.lang.String |
getLinkStatus()
After reading the gesture response, this returns the section
ending string terminating the gesture section, either
Link.END_TOTAL or Link.END_SECTION.
|
LinkProperties |
getProperties()
Get the key-value arguments for the request.
|
float |
getScale()
Get the scale of the map.
|
java.lang.String |
getType()
Return the header for this object.
|
int |
getWidth()
Get the width of the map in pixels.
|
java.lang.String |
read(Link link)
Read the link to create the request object.
|
java.lang.String |
toString() |
static void |
write(float centerLat,
float centerLon,
float scale,
int height,
int width,
LinkBoundingPoly[] boundingPolys,
LinkProperties props,
Link link)
Write the request to the link.
|
protected LatLonPoint center
protected float scale
protected LinkBoundingPoly[] boundingPolys
protected int height
protected int width
protected LinkProperties properties
protected static float version
public LinkMapRequest(Link link) throws java.io.IOException
link
- the Link to read from.java.io.IOException
public java.lang.String getType()
public java.lang.String getLinkStatus()
public static void write(float centerLat, float centerLon, float scale, int height, int width, LinkBoundingPoly[] boundingPolys, LinkProperties props, Link link) throws java.io.IOException
centerLat
- center latitude, in decimal degrees.centerLon
- center longitude, in decimal degrees.scale
- scale of map.height
- height of map in pixels.width
- width of map in pixels.boundingPolys
- An array of polygons of interest. Each
bounding polygon is a series of floats, alternating
latitude and longitude values.props
- Properties object containing key-value attributes.link
- link to write to.java.io.IOException
public java.lang.String read(Link link) throws java.io.IOException
link
- the link to read.IOException.
java.io.IOException
public LatLonPoint getCenter()
public float getScale()
public int getHeight()
public int getWidth()
public LinkBoundingPoly[] getBoundingPolys()
public LinkProperties getProperties()
public java.lang.String toString()
toString
in class java.lang.Object
Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details