## com.bbn.openmap.layer.link
Class LinkMapRequest

    java.lang.Object
      com.bbn.openmap.layer.link.LinkMapRequest

public class LinkMapRequest
extends java.lang.Object

A LinkMapRequest presents a view onto a map. This view can be used to create a list of graphics that should be added to the map, or to query a spatial database engine for other graphics.

This object can be used to write the query to the link, and to read the query from the link.

Field Summary
`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 Summary
`LinkMapRequest(Link link)` The constructor to use when reading the LinkMapRequest off the link.

Method Summary
`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.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### center

    protected LatLonPoint center

  The latitude/longitude of the center of the map.

### scale

    protected float scale

  The scale of the map. The value is interpreted as 1:<scale>

### boundingPolys

    protected LinkBoundingPoly[] boundingPolys

  A series of LinkBoundingPoly objects making up polygons of interest. NOTE: These polygons do not cover the poles, or cross the dateline. For areas like that that need to be described,, several LinkBoundingPolys must be used.

### height

    protected int height

  Height of the map, in pixels.

### width

    protected int width

  Width of the map, in pixels.

### properties

    protected LinkProperties properties

  Key value pairs of properties sent along with the map.

### version

    protected static float version

  Version Number of request format.

Constructor Detail

### LinkMapRequest

    public LinkMapRequest(Link link)
                   throws java.io.IOException

  The constructor to use when reading the LinkMapRequest off the link.

Parameters:
  `link` - the Link to read from.
Throws:
  `java.io.IOException`

Method Detail

### getType

    public java.lang.String getType()

  Return the header for this object.

  Returns:
    the String representing the header.

### getLinkStatus

    public 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.

  Returns:
    either Link.END_TOTAL or Link.END_SECTION.

### write

    public static void write(float centerLat,
                             float centerLon,
                             float scale,
                             int height,
                             int width,
                             LinkBoundingPoly[] boundingPolys,
                             LinkProperties props,
                             Link link)
                      throws java.io.IOException

  Write the request to the link.

  Parameters:
    `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.
  Throws:
    `java.io.IOException`

### read

    public java.lang.String read(Link link)
                          throws java.io.IOException

  Read the link to create the request object. Assumes the header has already been read.

  Parameters:
    `link` - the link to read.
  Throws:
    `IOException.`
    `java.io.IOException`

### getCenter

    public LatLonPoint getCenter()

  Get the center of the map.

### getScale

    public float getScale()

  Get the scale of the map.

### getHeight

    public int getHeight()

  Get the height of map in pixels.

### getWidth

    public int getWidth()

  Get the width of the map in pixels.

### getBoundingPolys

    public LinkBoundingPoly[] getBoundingPolys()

  Get an array of bounding polygons.

### getProperties

    public LinkProperties getProperties()

  Get the key-value arguments for the request.

### toString

    public java.lang.String toString()

Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details