twaver.gis
Interface GeographyMap


public interface GeographyMap

An interface is used to manage a geography map and paint it.

GeographyMap manages coordinate system, coordinate transformation, and coordinate correction. Every map object is set the default CRS(Coordinate Reference System), WGS84, which helps to transform a set of geography ordinates to a set of screen ordinates. In the future you can set custom CRS to a map object. GeographyMap can project an area of the map (named window of the map) to a specified rectangle area of the display device (view port).After you have correctly define the window and view port, you can success in getting correct coordinate transformation and displaying a map.

GeographyMap handles the event occurring on the map. When some import property of the map is changed, some MapEvent will occur and be dispatched to all the registered listeners. GeographyMap object can manage these listeners( added, removed, and so on) and dispatches these kinds of events to the listeners. For example, if the window of a map is changed, a MapEvent with the MAP_WINDOW_CHANGED type will occurs on the map. The map will dispatch this event to the registered listener which is interested in the map events.

Geography layers are the contents of a map. A GeographyMap object manages these layers. With a map object, you can add, remove, delete a layer, change the style of a specified layer, query the features of a layer, and even handle the event occurring on layers. If you are interested in some kind of MapLayerChangedEvent, you should register a MapLayerListener to the map. When some MapLayerChangedEvent occurs, the map will dispatch the event to the listener.


Field Summary
static int IMAGELAYER_INDEX
           
static int LAYERMOVE_TYPE_DOWN
          Constant for moving a layer.
static int LAYERMOVE_TYPE_TOBOTTOM
          Constant for moving a layer.
static int LAYERMOVE_TYPE_TOTOP
          Constant for moving a layer.
static int LAYERMOVE_TYPE_UP
          Constant for moving a layer.
static int MAPMODE_AREA_DWITHIN_SELECT
          Constant which defines how to operate the map.
static int MAPMODE_AREA_WITHIN_SELECT
          Constant which defines how to operate the map.
static int MAPMODE_DEFAULT
          Constant which defines how to operate the map.
static int MAPMODE_DISTANCE
          Constant which defines how to operate the map.
static int MAPMODE_PAN
          Constant which defines how to operate the map.
static int MAPMODE_SELECT
          Constant which defines how to operate the map.
static int MAPMODE_ZOOMIN
          Constant which defines how to operate the map.
static int MAPMODE_ZOOMIN_BYSCALE
           
static int MAPMODE_ZOOMOUT
          Constant which defines how to operate the map.
static int MAPMODE_ZOOMRESET
          Constant which defines how to operate the map.
 
Method Summary
 void addBackAndForwardTask()
          Adds a task to the redo/undo queue of the map object.
 void addLayer(java.lang.String layerName, int executorType)
          Adds a geographical layer to the map by specifying corresponding executor type.
 void addLayer(java.lang.String layerName, int executorType, GridBbox bbox, java.lang.String style, java.lang.String srs, java.lang.String serverPath)
          Adds a layer to the map.
 void addLayer(java.lang.String layerName, int executorType, java.lang.String serverPath)
          Adds a layer to the map.
 void addMapLayerListeren(MapLayerListener listener)
          Adds the specified MapLayerListener to the listener list.
 void addMapListener(MapListener listener)
          Adds the specified MapChangedListener to the listener list.
 void addPanActionFilter(PanActionFilter filter)
          Adds a PanActionFilter instance to the map.
 boolean canGoBack()
          Determines whether the map object can go back right now.
 boolean canGoForward()
          Determines whether the map object can go forward right now.
 boolean canPan()
          Determines if the map can be panned.
 void clearSelection()
          Clears all features from the selected features collection.
 void drawMap(java.awt.image.BufferedImage bufferImage)
           
 void drawMap(java.awt.Graphics2D g)
          Draws the context in the window of the map to something with the specified Graphics2D object
 java.lang.Object[] getAllLayerNames()
          Gets the names of all the layers stored in the map.
 twaver.GeoCoordinate getCenterPoint()
          Gets the center point of the map, and the point is described by a GeoCoordinate instance.
 double getDistance(java.util.ArrayList pointList)
          Measures the summation of the distances between the points stored in the specified ArrayList.
 double getDistance(double fromLongitude, double fromLatitude, double toLongitude, double toLatitude)
          Measures the distance between the two points specified by the given coordinates.
 java.awt.Color getGroundingColor()
          Gets the grounding color of the map
 GeographyLayer getLayer(int index)
          Gets a GeographyLayer object in the map with the specified index.
 GeographyLayer getLayer(java.lang.String layerName)
          Gets a GeographyLayer object by the specified layer name.
 int getLayerCount()
          Gets the count of the layers stored in the map.
 int getLayerIndex(java.lang.String layerName)
          Gets a layer's index by the specified layer name.
 GridBbox getLimitedArea()
          Gets the area of the map can display
 double[] getLL(double x, double y)
          Gets the geographical coordinate of a specified screen point which is described by x-y axes.
 java.awt.geom.Rectangle2D getMapArea()
          Gets the whole map's bounds.
 int getMapMode()
          Gets the operation mode of the map.
 java.lang.String getOverviewTitle()
          Gets the title of the overview window
 int getProjectionType()
          Gets the projection type of the map;
 int getQueryLayerIndex()
          Gets the index of the query layer.
 GeographyFeature[] getSelectedFeatures()
          Gets all selected GeographyFeatures
 java.awt.geom.Rectangle2D getSelectedFeaturesArea()
          Gets the area which is covered by the selected features.
 java.awt.Color getSelectedFilledColor()
          Gets the color used to fill the selected features.
 java.awt.Color getSelectedStrokeColor()
          Gets the color used to paint the selected features' bounds.
 java.awt.Rectangle getViewport()
          Gets the projection range.
 java.awt.geom.Rectangle2D getViewportBounds()
           
 java.awt.geom.Rectangle2D getWindow()
          Gets the window of the map.
 double getWindowMaxx()
          Gets the max longitude of the map's window.
 double getWindowMaxy()
          Gets the max latitude of the map's window.
 double getWindowMinx()
          Gets the minimal longitude of the map's window.
 double getWindowMiny()
          Gets the minimal latitude of the map's window.
 double[] getXY(double longitude, double latitude)
          Gets the screen coordinate of the point which is described by geographical coordinate.
 int getZoom()
          Gets current zoom of the map object.
 int getZoomLowLimit()
          Gets the lower limit of the map's zoom.
 int getZoomUpLimit()
          Gets the upper limit of the map's zoom.
 void goBack()
          Goes back to the last state of the map object which is stored in the map's redo/undo queue.
 void goForward()
          Goes forward to the next state of the map object which is stored in the map's redo/undo queue.
 boolean isEnableMouseWheelZoom()
          Determines whether the map can be zoomed in or zoomed out when the mouse wheel is scrolled
 boolean isSupportingBackAndForward()
          Determines whether the map object supports redo/undo tasks.
 boolean isVisible(int index)
          Determines whether the layer specified by the index is visible.
 boolean isVisible(java.lang.String layerName)
          Determines whether the specified layer in the map is visible.
 void moveLayer(java.lang.String layerName, int layerMovedType)
          Moves the specified geography layer upward or downward.
 void removeAllLayers()
          Removes all layers stored in the map.
 void removeLayer(int index)
          Removes a layer specified by the index.
 void removeLayer(java.lang.String layerName)
          Removes a layer specified by the layer name.
 void removeLayers(java.lang.String[] layerNames)
          Removes the layers specified by their names.
 void removeMapLayerListener(MapLayerListener listener)
          Removes the specified MapLayerListener from the listener list.
 void removeMapListener(MapListener listener)
          Removes the specified MapChangedListener from the listener list.
 void reset()
          Resets the window of the map.
 void selectFeatures(double x, double y)
          Selects the feature on the query layer by the specified point described by X and Y coordinates.
 void selectFeatures(java.awt.geom.Rectangle2D area)
          Selects features which are overlapped by the specified rectangle.
 void selectFeatures(java.lang.String attributeName, int operator, java.lang.Object value)
          Selects the features on the query layer by the specified attribute value.
 void setBackAndForwardLimit(int limit)
          Specifies the capability of the map object's redo/undo queue.
 void setCenterPoint(double longitude, double latitude)
          Sets the center point of the map.
 void setCenterPoint(twaver.GeoCoordinate center)
          Specifies the center point of the map.
 void setEnableMouseWheelZoom(boolean enable)
          Defines if the map can be zoomed in or zoomed out when the mouse wheel is scrolled
 void setGroundingColor(java.awt.Color color)
          Sets the grounding color of the map.
 void setLimitedArea(GridBbox limitedArea)
          Defines the area of the map can display
 void setMapMode(int value)
          Sets the operation mode of the map.
 void setOverviewTitle(java.lang.String title)
          Sets the title of the overview window
 void setProjectionType(int type)
          Sets the projection type of the map;
 void setQueryLayer(int index)
          Defines which layer is the query layer by the specified index.
 void setQueryLayer(java.lang.String layerName)
          Defines which layer is the query layer by the specified layerName.
 void setSupportingBackAndForward(boolean supportingUndo)
          Specifies the if the map can support redo/undo tasks.
 void setViewport(java.awt.Rectangle viewportRect)
          Sets the projection range.
 void setWindow(double minLongitude, double minLatitude, double maxLongitude, double maxLatitude)
          Defines the window on the map with the specified area in latitude and longitude coordinates.
 boolean setZoom(int zoom)
          Sets the zoom of the map object.
 void setZoomLevels(int[] levels)
           
 void setZoomLowLimit(int lowlimit)
          Sets the lower limit of the map's zoom.
 void setZoomUpLimit(int uplimit)
          Sets the upper limit of the map's zoom.
 

Field Detail

IMAGELAYER_INDEX

public static final int IMAGELAYER_INDEX
See Also:
Constant Field Values

LAYERMOVE_TYPE_DOWN

public static final int LAYERMOVE_TYPE_DOWN
Constant for moving a layer. It specifies a geography layer will be moved downward .

See Also:
moveLayer(java.lang.String, int), Constant Field Values

LAYERMOVE_TYPE_TOBOTTOM

public static final int LAYERMOVE_TYPE_TOBOTTOM
Constant for moving a layer. It specifies a geography layer will be moved to the bottom of the map .

See Also:
moveLayer(java.lang.String, int), Constant Field Values

LAYERMOVE_TYPE_TOTOP

public static final int LAYERMOVE_TYPE_TOTOP
Constant for moving a layer. It specifies a geography layer will be moved to the top of the map .

See Also:
moveLayer(java.lang.String, int), Constant Field Values

LAYERMOVE_TYPE_UP

public static final int LAYERMOVE_TYPE_UP
Constant for moving a layer. It specifies a geography layer will be moved upward .

See Also:
moveLayer(java.lang.String, int), Constant Field Values

MAPMODE_AREA_DWITHIN_SELECT

public static final int MAPMODE_AREA_DWITHIN_SELECT
Constant which defines how to operate the map. It specifies the operation to select the features which is cross the specified area.

See Also:
getMapMode(), setMapMode(int), Constant Field Values

MAPMODE_AREA_WITHIN_SELECT

public static final int MAPMODE_AREA_WITHIN_SELECT
Constant which defines how to operate the map. It specifies the operation to select the features which is in the specified area.

See Also:
getMapMode(), setMapMode(int), Constant Field Values

MAPMODE_DEFAULT

public static final int MAPMODE_DEFAULT
Constant which defines how to operate the map. It specifies no operation on map.

See Also:
getMapMode(), setMapMode(int), Constant Field Values

MAPMODE_DISTANCE

public static final int MAPMODE_DISTANCE
Constant which defines how to operate the map. It specifies the operation to measure the distance.

See Also:
Constant Field Values

MAPMODE_PAN

public static final int MAPMODE_PAN
Constant which defines how to operate the map. It specifies pan operation.

See Also:
getMapMode(), setMapMode(int), Constant Field Values

MAPMODE_SELECT

public static final int MAPMODE_SELECT
Constant which defines how to operate the map. It specifies selection operation to the specified coordinates.

See Also:
getMapMode(), setMapMode(int), Constant Field Values

MAPMODE_ZOOMIN

public static final int MAPMODE_ZOOMIN
Constant which defines how to operate the map. It specifies the operation to zoom in.

See Also:
getMapMode(), setMapMode(int), Constant Field Values

MAPMODE_ZOOMIN_BYSCALE

public static final int MAPMODE_ZOOMIN_BYSCALE
See Also:
Constant Field Values

MAPMODE_ZOOMOUT

public static final int MAPMODE_ZOOMOUT
Constant which defines how to operate the map. It specifies the operation to zoom out.

See Also:
getMapMode(), setMapMode(int), Constant Field Values

MAPMODE_ZOOMRESET

public static final int MAPMODE_ZOOMRESET
Constant which defines how to operate the map. It specifies reset operation .

See Also:
getMapMode(), setMapMode(int), Constant Field Values
Method Detail

addBackAndForwardTask

public void addBackAndForwardTask()
Adds a task to the redo/undo queue of the map object. The task contains the current states of the map, e.g current window, current view port, current center coordinate, etc.


addLayer

public void addLayer(java.lang.String layerName,
                     int executorType)
Adds a geographical layer to the map by specifying corresponding executor type.

Parameters:
layerName - the name of the layer which is being added into a map object.
executorType - the type of the executor which provides data for the specified layer.
See Also:
TWaverGisConst.EXECUTOR_TYPE_GEOSERVER, TWaverGisConst.EXECUTOR_TYPE_GEOSERVER_CACHE

addLayer

public void addLayer(java.lang.String layerName,
                     int executorType,
                     GridBbox bbox,
                     java.lang.String style,
                     java.lang.String srs,
                     java.lang.String serverPath)
Adds a layer to the map.

Parameters:
layerName - the name of the layer
executorType - the executor type used to load geographical data from server
bbox - the layer's bounding box.
style - the style used to render the layer by the server
srs - the SRS used to display the layer.
serverPath - the URL of the map server.

addLayer

public void addLayer(java.lang.String layerName,
                     int executorType,
                     java.lang.String serverPath)
Adds a layer to the map.

Parameters:
layerName - the name of the layer
executorType - the executor type used to load geographical data from server
serverPath - the URL of the map server.

addMapLayerListeren

public void addMapLayerListeren(MapLayerListener listener)
Adds the specified MapLayerListener to the listener list.

Parameters:
listener - the specified MapLayerListener

addMapListener

public void addMapListener(MapListener listener)
Adds the specified MapChangedListener to the listener list.

Parameters:
listener - the specified MapChangedListener

addPanActionFilter

public void addPanActionFilter(PanActionFilter filter)
Adds a PanActionFilter instance to the map.

Parameters:
filter - a PanActionFilter instance

canGoBack

public boolean canGoBack()
Determines whether the map object can go back right now.

Returns:
true if the map object can go back, false otherwise

canGoForward

public boolean canGoForward()
Determines whether the map object can go forward right now.

Returns:
true if the map object can go forward, false otherwise

canPan

public boolean canPan()
Determines if the map can be panned.

Returns:
true, if the map can be panned, false otherwise.

clearSelection

public void clearSelection()
Clears all features from the selected features collection.


drawMap

public void drawMap(java.awt.image.BufferedImage bufferImage)

drawMap

public void drawMap(java.awt.Graphics2D g)
Draws the context in the window of the map to something with the specified Graphics2D object

Parameters:
g - the specified Graphics2D object

getAllLayerNames

public java.lang.Object[] getAllLayerNames()
Gets the names of all the layers stored in the map.

Returns:
a String array storing the names.

getCenterPoint

public twaver.GeoCoordinate getCenterPoint()
Gets the center point of the map, and the point is described by a GeoCoordinate instance.

Returns:
the geographical coordinate of the center point of the map object.

getDistance

public double getDistance(java.util.ArrayList pointList)
Measures the summation of the distances between the points stored in the specified ArrayList. All the points should be described by latitude and longitude coordinates.

Parameters:
pointList - the specified ArrayList object, which stores the points.
Returns:
the summation of the distances

getDistance

public double getDistance(double fromLongitude,
                          double fromLatitude,
                          double toLongitude,
                          double toLatitude)
Measures the distance between the two points specified by the given coordinates.

Parameters:
fromLongitude - the from point's longitude coordinate.
fromLatitude - the from point's latitude coordinate.
toLongitude - the to point's longitude coordinate.
toLatitude - the to point's latitude coordinate.
Returns:
the distance between the two points. The default unit is meter. The unit is relative to the CRS.

getGroundingColor

public java.awt.Color getGroundingColor()
Gets the grounding color of the map

Returns:
the grounding color.

getLayer

public GeographyLayer getLayer(int index)
Gets a GeographyLayer object in the map with the specified index.

Parameters:
index - the specified index
Returns:
the relative GeographyLayer object.Null means there is no layer object at the specified location.

getLayer

public GeographyLayer getLayer(java.lang.String layerName)
Gets a GeographyLayer object by the specified layer name.

Parameters:
layerName - the specified layer name
Returns:
a GeographyLayer object if there is a layer which has the specified name, null otherwise

getLayerCount

public int getLayerCount()
Gets the count of the layers stored in the map.

Returns:
the count of the layers.

getLayerIndex

public int getLayerIndex(java.lang.String layerName)
Gets a layer's index by the specified layer name.

Parameters:
layerName - the specified layer name
Returns:
the correct index of the layer

getLimitedArea

public GridBbox getLimitedArea()
Gets the area of the map can display

Returns:
the area of the map can display.

getLL

public double[] getLL(double x,
                      double y)
Gets the geographical coordinate of a specified screen point which is described by x-y axes.

Parameters:
x - the x value of the specified screen point
y - the y value of the specified screen point
Returns:
the geographical coordinate of the specified screen point.
See Also:
GisToolkits.convertScreenToLatLong(GeographyMap, double, double)

getMapArea

public java.awt.geom.Rectangle2D getMapArea()
Gets the whole map's bounds.

Returns:
the map's bounds. You can get the min coordinates by invoking getMinX() and getMinY(). You can get the max coordinates by invoking getMaxX() and getMaxY(). The coordinates is latitude and longitude coordinates. For example: Rectangle2D area = map.getMapArea(); System.out.println("the min coordinate is "+area.getMinX()+","+area.getMinY()); the result will be like: the min coordinate is 110.3234,22.4343

getMapMode

public int getMapMode()
Gets the operation mode of the map.

Returns:
the operation mode. The value will be one of the following choices:
See Also:
MAPMODE_DEFAULT, MAPMODE_ZOOMIN, MAPMODE_ZOOMOUT, MAPMODE_ZOOMOUT, MAPMODE_PAN, MAPMODE_SELECT, MAPMODE_DISTANCE, MAPMODE_AREA_WITHIN_SELECT, MAPMODE_AREA_DWITHIN_SELECT

getOverviewTitle

public java.lang.String getOverviewTitle()
Gets the title of the overview window

Returns:
the title of the overview window

getProjectionType

public int getProjectionType()
Gets the projection type of the map;

Returns:
The projection type of the map
See Also:
TWaverGisConst.PROJECTIONTYPE_MERCATOR, TWaverGisConst.PROJECTIONTYPE_4326

getQueryLayerIndex

public int getQueryLayerIndex()
Gets the index of the query layer.

Returns:
the index of the query layer.

getSelectedFeatures

public GeographyFeature[] getSelectedFeatures()
Gets all selected GeographyFeatures

Returns:
an array filled with selected features .

getSelectedFeaturesArea

public java.awt.geom.Rectangle2D getSelectedFeaturesArea()
Gets the area which is covered by the selected features.

Returns:
the area which is covered by the selected features. The area is described by geographical coordinates.

getSelectedFilledColor

public java.awt.Color getSelectedFilledColor()
Gets the color used to fill the selected features.

Returns:
the color used to fill the selected features

getSelectedStrokeColor

public java.awt.Color getSelectedStrokeColor()
Gets the color used to paint the selected features' bounds.

Returns:
the color used to paint the selected features' bounds

getViewport

public java.awt.Rectangle getViewport()
Gets the projection range.

Returns:
the view port described by screen coordinates.

getViewportBounds

public java.awt.geom.Rectangle2D getViewportBounds()

getWindow

public java.awt.geom.Rectangle2D getWindow()
Gets the window of the map.

Returns:
a Rectangle2D object storing the window information if a window is set, null otherwise

getWindowMaxx

public double getWindowMaxx()
Gets the max longitude of the map's window.

Returns:
the max longitude of the window

getWindowMaxy

public double getWindowMaxy()
Gets the max latitude of the map's window.

Returns:
the max latitude

getWindowMinx

public double getWindowMinx()
Gets the minimal longitude of the map's window.

Returns:
the minimal longitude of the window

getWindowMiny

public double getWindowMiny()
Gets the minimal latitude of the map's window.

Returns:
the minimal latitude

getXY

public double[] getXY(double longitude,
                      double latitude)
Gets the screen coordinate of the point which is described by geographical coordinate.

Parameters:
longitude - the longitude of the specified point.
latitude - the latitude of the specified point.
Returns:
null, if TWaver can not covert the point correctly; an array containing 2 double values otherwise. The first value represents x value, and the second value represents y value.
See Also:
GisToolkits.convertLatLongToScreen(GeographyMap, double, double)

getZoom

public int getZoom()
Gets current zoom of the map object.

Returns:
current zoom of the map.

getZoomLowLimit

public int getZoomLowLimit()
Gets the lower limit of the map's zoom.

Returns:
the lower limit of the map's zoom.

getZoomUpLimit

public int getZoomUpLimit()
Gets the upper limit of the map's zoom.

Returns:
the upper limit of the map's zoom.

goBack

public void goBack()
            throws javax.swing.undo.CannotUndoException
Goes back to the last state of the map object which is stored in the map's redo/undo queue.

Throws:
javax.swing.undo.CannotUndoException

goForward

public void goForward()
               throws javax.swing.undo.CannotUndoException
Goes forward to the next state of the map object which is stored in the map's redo/undo queue.

Throws:
javax.swing.undo.CannotUndoException

isEnableMouseWheelZoom

public boolean isEnableMouseWheelZoom()
Determines whether the map can be zoomed in or zoomed out when the mouse wheel is scrolled

Returns:
true if the map can be zoomed by scrolling mouse wheel; false otherwise.

isSupportingBackAndForward

public boolean isSupportingBackAndForward()
Determines whether the map object supports redo/undo tasks.

Returns:
true if the map object can redo/undo, false otherwise

isVisible

public boolean isVisible(int index)
Determines whether the layer specified by the index is visible.

Parameters:
index - the specified index
Returns:
true if the layer is visible, false otherwise

isVisible

public boolean isVisible(java.lang.String layerName)
Determines whether the specified layer in the map is visible.

Parameters:
layerName - the name of the specified layer.
Returns:
true if the layer is visible, false otherwise

moveLayer

public void moveLayer(java.lang.String layerName,
                      int layerMovedType)
Moves the specified geography layer upward or downward.

Parameters:
layerName - the name of the layer which will be moved
layerMovedType - the type which specifies how to move the specified layer. You must specify one of the following choices:
See Also:
LAYERMOVE_TYPE_UP, LAYERMOVE_TYPE_DOWN, LAYERMOVE_TYPE_TOTOP, LAYERMOVE_TYPE_TOBOTTOM

removeAllLayers

public void removeAllLayers()
Removes all layers stored in the map.


removeLayer

public void removeLayer(int index)
Removes a layer specified by the index.

Parameters:
index - the specified index.

removeLayer

public void removeLayer(java.lang.String layerName)
Removes a layer specified by the layer name.

Parameters:
layerName - the name of the layer

removeLayers

public void removeLayers(java.lang.String[] layerNames)
Removes the layers specified by their names.

Parameters:
layerNames - the specified names , stored in an array.

removeMapLayerListener

public void removeMapLayerListener(MapLayerListener listener)
Removes the specified MapLayerListener from the listener list.

Parameters:
listener - the specified MapLayerListener

removeMapListener

public void removeMapListener(MapListener listener)
Removes the specified MapChangedListener from the listener list.

Parameters:
listener - the specified MapChangedListener

reset

public void reset()
Resets the window of the map. Projects the whole map to the specified rectangle area.


selectFeatures

public void selectFeatures(double x,
                           double y)
Selects the feature on the query layer by the specified point described by X and Y coordinates.

Parameters:
x - the X coordinate on the screen
y - the Y coordinate on the screen

selectFeatures

public void selectFeatures(java.awt.geom.Rectangle2D area)
Selects features which are overlapped by the specified rectangle.

Parameters:
area - the screen area, in which you want to select features

selectFeatures

public void selectFeatures(java.lang.String attributeName,
                           int operator,
                           java.lang.Object value)
Selects the features on the query layer by the specified attribute value.

Parameters:
attributeName - the name of the attribute which is used to be compared.
operator - the type of comparison operation. You can pick the following choices:
value - used as the reference value For example: selectFeatures("NAME",TWaverGisConst.OPERATOR_EQUAL,"New York"); will pick out all the features which have the " NAME" attribute and the attribute value is "New York".
See Also:
TWaverGisConst.COMPARISON_OPERATOR_LESSOREQUAL, TWaverGisConst.COMPARISON_OPERATOR_LESS, TWaverGisConst.COMPARISON_OPERATOR_GREATER, TWaverGisConst.COMPARISON_OPERATOR_GREATEROREQUAL, TWaverGisConst.COMPARISON_OPERATOR_EQUAL

setBackAndForwardLimit

public void setBackAndForwardLimit(int limit)
Specifies the capability of the map object's redo/undo queue.


setCenterPoint

public void setCenterPoint(double longitude,
                           double latitude)
Sets the center point of the map.

Parameters:
longitude - the longitude of the center point of the map.
latitude - the latitude of the center point of the map.

setCenterPoint

public void setCenterPoint(twaver.GeoCoordinate center)
Specifies the center point of the map. This method will pan the specified center coordinate to the center of the screen. The center point should be described by geographical coordinate wrapped by GeoCoordinate class.

Parameters:
center - the center point .

setEnableMouseWheelZoom

public void setEnableMouseWheelZoom(boolean enable)
Defines if the map can be zoomed in or zoomed out when the mouse wheel is scrolled

Parameters:
enable -

setGroundingColor

public void setGroundingColor(java.awt.Color color)
Sets the grounding color of the map.

Parameters:
color - the grounding color.

setLimitedArea

public void setLimitedArea(GridBbox limitedArea)
Defines the area of the map can display

Parameters:
limitedArea - the specified area. For example: To make the map only display an area which bottom left corner's geography coordinate is (0,0) and which top right corner's geography coordinate is (180,90), you can invoke the method like the following: map.setLimitedArea(new GridBbox(0,0,180,90);

setMapMode

public void setMapMode(int value)
Sets the operation mode of the map.

Parameters:
value - defines the operation mode. You must specify one of the following choices:
See Also:
MAPMODE_DEFAULT, MAPMODE_ZOOMIN, MAPMODE_ZOOMOUT, MAPMODE_ZOOMOUT, MAPMODE_PAN, MAPMODE_SELECT, MAPMODE_DISTANCE, MAPMODE_AREA_WITHIN_SELECT, MAPMODE_AREA_DWITHIN_SELECT

setOverviewTitle

public void setOverviewTitle(java.lang.String title)
Sets the title of the overview window

Parameters:
title - the specified title of the overview window.

setProjectionType

public void setProjectionType(int type)
Sets the projection type of the map;

Parameters:
type - the specified projection type of the map
See Also:
TWaverGisConst.PROJECTIONTYPE_MERCATOR, TWaverGisConst.PROJECTIONTYPE_4326, getProjectionType()

setQueryLayer

public void setQueryLayer(int index)
Defines which layer is the query layer by the specified index.

Parameters:
index - the specified index.

setQueryLayer

public void setQueryLayer(java.lang.String layerName)
Defines which layer is the query layer by the specified layerName.

Parameters:
layerName - the specified layer name.

setSupportingBackAndForward

public void setSupportingBackAndForward(boolean supportingUndo)
Specifies the if the map can support redo/undo tasks.

Parameters:
supportingUndo -

setViewport

public void setViewport(java.awt.Rectangle viewportRect)
Sets the projection range.

Parameters:
viewportRect - the projection range

setWindow

public void setWindow(double minLongitude,
                      double minLatitude,
                      double maxLongitude,
                      double maxLatitude)
Defines the window on the map with the specified area in latitude and longitude coordinates.

Parameters:
minLongitude - the minimal longitude
minLatitude - the minimal latitude
maxLongitude - the max longitude
maxLatitude - the max latitude

setZoom

public boolean setZoom(int zoom)
Sets the zoom of the map object.

Parameters:
zoom - the specified zoom.

setZoomLevels

public void setZoomLevels(int[] levels)

setZoomLowLimit

public void setZoomLowLimit(int lowlimit)
Sets the lower limit of the map's zoom.

Parameters:
lowlimit - the specified lower limit of the map's zoom.

setZoomUpLimit

public void setZoomUpLimit(int uplimit)
Sets the upper limit of the map's zoom.

Parameters:
uplimit - the specified upper limit of the map's zoom.