com.mapquest
Class MapState

java.lang.Object
  extended bycom.mapquest.MQObject
      extended bycom.mapquest.MapState
All Implemented Interfaces:
java.lang.Cloneable

public class MapState
extends MQObject

Defines the characteristics of a map. It includes such information as the map name, the coverage name, the latitude/longitude of the map Center, the map scale, and the image size.

See Also:
LatLng, Point

Field Summary
static int CLASS_ID
           
static java.lang.String CLASS_NAME
           
 
Fields inherited from class com.mapquest.MQObject
DEFAULT_ID, DEFAULT_NAME, DEFAULT_VERSION, FORMAT_NUMERIC_ID, FORMAT_TEXT_NAME, INVALID_ID, INVALID_NAME, INVALID_VERSION
 
Constructor Summary
MapState()
          Default constructor.
MapState(MapState map)
          Copy constructor.
 
Method Summary
 void copy(MapState map)
          Copy function, reassigns all the values.
 boolean equals(java.lang.Object otherObject)
          Compares this object to the specified object.
 LatLng getCenter()
          Returns the Center point of the map associated with this MapState object.
 int getClassId()
          Returns the numeric id of this class.
 java.lang.String getClassName()
          Returns the text name of this class.
 java.lang.String getCoverageName()
          Returns the coverage name of the map associated with this MapState object.
 double getHeightInches()
          Returns the height of the generated map in inches.
 int getHeightPixels()
          Returns the height of the generated map in pixels.
 int getHeightPixels(int dpi)
          Returns the height of the generated map in pixels.
 java.lang.String getMapName()
          Returns the map name of the map associated with this MapState object.
 int getMapScale()
          Returns the scale of the map associated with this MapState object.
 double getWidthInches()
          Returns the width of the generated map in inches.
 int getWidthPixels()
          Returns the width of the generated map in pixels.
 int getWidthPixels(int dpi)
          Returns the width of the generated map in pixels.
 int hashCode()
          Returns a hash code for this MapState.
 void init()
          Initializes object.
 void setCenter(LatLng ll)
          Sets the Center point of the map associated with this MapState object.
 void setCoverageName(java.lang.String strCovId)
          Sets the coverage name for the map associated with this MapState object.
 void setHeightInches(double dHeight)
          Sets the height of the generated map in inches.
 void setHeightPixels(int iHeight)
          Sets the height of the generated map in pixels.
 void setHeightPixels(int iHeight, int dpi)
          Sets the height of the generated map in pixels.
 void setMapName(java.lang.String strName)
          Sets the map name of the map associated with this MapState object.
 void setMapScale(int nNewScale)
          Sets the scale of the map associated with this MapState object.
 void setWidthInches(double dWidth)
          Sets the width of the generated map in inches.
 void setWidthPixels(int iWidth)
          Sets the width of the generated map in pixels.
 void setWidthPixels(int iWidth, int dpi)
          Sets the width of the generated map in pixels.
 
Methods inherited from class com.mapquest.MQObject
clone, getFormat, getIdWithVersion, getNameWithVersion, getObjectVersion, getTypeId, getTypeName, getVerboseConsoleOutput, setFormat, setObjectVersion, setVerboseConsoleOutput, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASS_ID

public static final int CLASS_ID
See Also:
Constant Field Values

CLASS_NAME

public static final java.lang.String CLASS_NAME
See Also:
Constant Field Values
Constructor Detail

MapState

public MapState()
Default constructor.


MapState

public MapState(MapState map)
Copy constructor.

Method Detail

copy

public void copy(MapState map)
Copy function, reassigns all the values.


init

public void init()
Initializes object.

Overrides:
init in class MQObject

getClassId

public int getClassId()
Returns the numeric id of this class.

Overrides:
getClassId in class MQObject
Returns:
the numeric id of this class.

getClassName

public java.lang.String getClassName()
Returns the text name of this class.

Overrides:
getClassName in class MQObject
Returns:
the text name of this class.

setMapName

public void setMapName(java.lang.String strName)
Sets the map name of the map associated with this MapState object.

Parameters:
strName - The map name for the map associated with this MapState object.

setCoverageName

public void setCoverageName(java.lang.String strCovId)
Sets the coverage name for the map associated with this MapState object.

Parameters:
strCovId - The coverage name of the map associated with this MapState object.

setCenter

public void setCenter(LatLng ll)
Sets the Center point of the map associated with this MapState object.

Parameters:
ll - The Center point for the map associated with this MapState object.

setWidthInches

public void setWidthInches(double dWidth)
Sets the width of the generated map in inches.

Parameters:
dWidth - double value specifying the width of the map in inches.

setHeightInches

public void setHeightInches(double dHeight)
Sets the height of the generated map in inches.

Parameters:
dHeight - double value specifying the height of the map in inches.

getWidthInches

public double getWidthInches()
Returns the width of the generated map in inches.


getHeightInches

public double getHeightInches()
Returns the height of the generated map in inches.


setWidthPixels

public void setWidthPixels(int iWidth)
Sets the width of the generated map in pixels. Default DPI is 72.

Parameters:
iWidth - int value specifying the width of the map in pixels.

setHeightPixels

public void setHeightPixels(int iHeight)
Sets the height of the generated map in pixels. Default DPI is 72.

Parameters:
iHeight - int value specifying the height of the map in pixels.

setWidthPixels

public void setWidthPixels(int iWidth,
                           int dpi)
Sets the width of the generated map in pixels.

Parameters:
iWidth - int value specifying the width of the map in pixels.
dpi - int value specifying the DPI of the image, used to convert from inches to pixels.

setHeightPixels

public void setHeightPixels(int iHeight,
                            int dpi)
Sets the height of the generated map in pixels.

Parameters:
iHeight - int value specifying the height of the map in pixels.
dpi - int value specifying the DPI of the image, used to convert from inches to pixels.

getWidthPixels

public int getWidthPixels()
Returns the width of the generated map in pixels. Default DPI is 72.


getHeightPixels

public int getHeightPixels()
Returns the height of the generated map in pixels. Default DPI is 72.


getWidthPixels

public int getWidthPixels(int dpi)
Returns the width of the generated map in pixels.

Parameters:
dpi - int value specifying the DPI used to convert image size from inches to pixels.

getHeightPixels

public int getHeightPixels(int dpi)
Returns the height of the generated map in pixels.

Parameters:
dpi - int value specifying the DPI used to convert image size from inches to pixels.

setMapScale

public void setMapScale(int nNewScale)
Sets the scale of the map associated with this MapState object.

Parameters:
nNewScale - The new scale value for the map associated with this MapState object.

getMapName

public java.lang.String getMapName()
Returns the map name of the map associated with this MapState object.

Returns:
The map name of the map associated with this MapState object.

getCoverageName

public java.lang.String getCoverageName()
Returns the coverage name of the map associated with this MapState object.

Returns:
The coverage name of this MapState object.

getCenter

public LatLng getCenter()
Returns the Center point of the map associated with this MapState object.

Returns:
The Center point of this MapState object.

getMapScale

public int getMapScale()
Returns the scale of the map associated with this MapState object.

Returns:
The scale of this MapState object.

equals

public boolean equals(java.lang.Object otherObject)
Compares this object to the specified object. The result is true if and only if the argument is not null and is a MapState object that has same attributes as this object.

Overrides:
equals in class MQObject
Parameters:
otherObject - the object to compare this MapState against.
Returns:
true if the MapState objects are equal; false otherwise.

hashCode

public int hashCode()
Returns a hash code for this MapState.

Overrides:
hashCode in class MQObject
Returns:
a hash code value for this MapState.