|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.moximedia.ows.Map
The Map class contains the complete instance of an IMF map session, and modifications to the map layers, etc. that have been done during an application session. If the current state of the map is needed in subsequent pages, this object should be stored in the session object.
| Field Summary | |
static int |
mapid
|
| Fields inherited from interface com.moximedia.ows.types.ServiceType |
SERVICE_TYPE_ACETATE, SERVICE_TYPE_WFS, SERVICE_TYPE_WMS |
| Fields inherited from interface com.moximedia.ows.types.LayerType |
LAYER_TYPE_ACETATE, LAYER_TYPE_WFS, LAYER_TYPE_WMS |
| Fields inherited from interface com.moximedia.ows.types.ScalebarUnitsType |
SCALEBAR_UNITS_FEET, SCALEBAR_UNITS_FEET_OR_MILES, SCALEBAR_UNITS_KILOMETERS, SCALEBAR_UNITS_METERS, SCALEBAR_UNITS_METERS_OR_KILOMETERS, SCALEBAR_UNITS_MILES, SCALEBAR_UNITS_NONE |
| Fields inherited from interface com.moximedia.ows.types.MeasureUnitsType |
MEASURE_UNITS_DECIMAL_DEGREES, MEASURE_UNITS_FEET, MEASURE_UNITS_IMPERIAL, MEASURE_UNITS_METERS, MEASURE_UNITS_METRES, MEASURE_UNITS_METRIC, MEASURE_UNITS_UNKNOWN, MEASURE_UNITS_US, MEASURE_UNITS_YARDS |
| Constructor Summary | |
Map()
Creates new Map |
|
Map(java.lang.String outputDir,
java.lang.String outputUrlPath)
Creates new Map |
|
| Method Summary | |
void |
addHighlightLayer(WmsLayer layer)
Creates a highlighting acetate layer showing the selected features of the specified layer. |
void |
addLayer(int index,
Layer layer)
Adds a layer to the map at the specified index. |
void |
addLayer(Layer layer)
Adds a layer to the map. |
void |
addMapScript(java.lang.String scriptName)
Adds a map script to the map script array. |
void |
addProjection(Projection prj)
Adds an available projection definition to the map. |
void |
addService(WfsService service)
Adds a WfsService to the map. |
void |
addService(WmsService service)
Adds a WmsService to the map. |
java.lang.Object |
clone()
Makes a copy of the map object |
void |
doZoom(double mapX,
double mapY,
double zoomFactor)
Changes the extent of the map, leaving the centre point the same. |
java.lang.String |
getAlertMessage()
Gets an alert message set by IMF for display when the map redraws. |
Geometry |
getAreaOfInterest()
Gets the geometry stored as an area of interest. |
Color |
getBackgroundColor()
Gets the background color of the map. |
Projection |
getCenterCoordinateProjection()
Gets the projection used to display the map center coordinate. |
java.lang.String |
getCopyrightOwner()
Gets the copyright owner, if any. |
Editing |
getEditing()
Gets the editing settings for this map. |
Envelope |
getExtent()
Gets the current map extent. |
Folders |
getFolders()
Gets the Folders associated with the map. |
Envelope |
getFullExtent()
Gets the full extent of the map. |
int |
getHeight()
Gets the map height, in pixels. |
java.awt.image.BufferedImage |
getImage()
Fuses the images received from various services into a single image. |
java.lang.String |
getImageUrl()
Fuses the images received from various services into a single image. |
Envelope |
getInitialExtent()
Gets the initial extent of the map. |
java.util.HashMap |
getKnownProjections()
Gets the HashMap containing the known projections. |
Layers |
getLayers()
Gets the layers of the map. |
java.util.Locale |
getLocale()
Gets the Locale used for internationalization. |
java.util.ArrayList |
getMapScripts()
Gets the map script array, or null if there are not any. |
java.awt.geom.AffineTransform |
getMapTransform()
Returns an AffineTransform for use to convert page units to map units. |
int |
getMapUnits()
Gets the map units enumerator. |
Envelope |
getMaximumExtent()
Gets the maximum extent of the map. |
java.awt.geom.AffineTransform |
getPageTransform()
Returns an AffineTransform for use to convert map units to page units. |
Projection |
getProjection()
Gets the display projection of the map. |
Projection |
getProjection(java.lang.String srs)
Returns the projection with the spedified SRS. |
java.lang.String |
getProperty(java.lang.String name)
Gets the value of a property set in the configuration XML using a <PROPERTY> element. |
java.lang.String |
getSaxParser()
Gets the name of the class used for parsing XML. |
double |
getScale()
Gets the current map scale. |
double |
getScale(double scaleFactor)
Gets the scale for the specified scale factor (map units per pixel). |
int |
getScalebarUnits()
Gets the scalebar units enumerator. |
double |
getScaleFactor()
Gets the scale factor, which is map units per pixel, calculated in the x direction. |
double |
getScaleFactor(double scale)
Gets the scale factor (map units per pixel) for the specified scale. |
java.lang.String |
getSrs()
Gets the spatial reference system for the map display. |
java.lang.String |
getTempDir()
Gets the temporary directory for image streaming. |
java.lang.String |
getTempUrlPath()
Gets the temporary url path for image streaming. |
WfsService |
getWfsService(java.lang.String serviceName)
Gets the WfsService with the specified name. |
java.util.ArrayList |
getWfsServices()
Gets the array of WfsServices contained in this map. |
int |
getWidth()
Gets the map width in pixels. |
WmsService |
getWmsService(int objectId)
Gets the WmsService with the specified object id. |
WmsService |
getWmsService(java.lang.String serviceName)
Gets the WMsService with the specified name. |
java.util.ArrayList |
getWmsServices()
Gets the array of WMsServices contained in this map. |
boolean |
isCenterCoordinateVisible()
Returns an indicator of whether the map center coordinate should be displayed on the map. |
boolean |
isCopyrightVisible()
Returns an indicator of whether the copyright message should be displayed on the map. |
boolean |
isForwarded()
Returns an indicator of whether the complete map should be fused from the various WMS servers then forwarded to the user. |
boolean |
isNorthArrowVisible()
Returns an indicator of whether the north arrow should be shown. |
boolean |
isScalebarVisible()
Returns an indicator of wheter the scalebar should be shown. |
void |
removeHighlightLayer(WmsLayer layer)
Removes the highlighting acetate layer associated with the specified layer. |
void |
removeProperty(java.lang.String name)
Removes the specified property. |
void |
setAreaOfInterest(Geometry geometry)
Sets the geometry to be stored as an area of interest. |
void |
setBackgroundColor(Color color)
Sets the background color of the map. |
void |
setEditing(Editing editing)
Sets the editing settings for this map. |
void |
setExtent(Envelope extent)
Sets the extent of the map to the specified envelope. |
void |
setFolders(Folders folders)
Sets the folders associated with this map. |
void |
setForwarded(boolean forwarded)
Sets of whether the complete map should be fused from the various WMS servers then forwarded to the user. |
void |
setFullExtent(Envelope extent)
Sets the full extent of the map. |
void |
setInitialExtent(Envelope extent)
Sets the initial display extent of the map. |
void |
setLocale(java.util.Locale locale)
Sets the Locale used for internationalization. |
void |
setMaximumExtent(Envelope extent)
Sets the maximum extent of the map. |
void |
setProjection(Projection projection)
Sets the projection of the map. |
void |
setProperty(java.lang.String name,
java.lang.String value)
Sets the value of a property (programmer defined). |
void |
setSaxParser(java.lang.String className)
Sets the class name of the SAX parser |
void |
setScalebarUnits(int units)
Sets the scalebar units using the scalebar units enumerator. |
void |
setScalebarUnits(java.lang.String units)
Sets the scalebar units using a String. |
void |
setSize(int width,
int height)
Sets the size of the map in pixels. |
void |
setSrs(java.lang.String srs)
Sets the spatial reference system for the map display. |
void |
setTempDir(java.lang.String dir)
Sets the temporary directory for image streaming. |
void |
setTempUrlPath(java.lang.String path)
Sets the temporary path for image streaming. |
void |
setXmlAttribute(java.lang.String element,
java.lang.String name,
java.lang.String value)
Sets one of the attributes of this object using a string value. |
Point |
toMapPoint(Point pagePoint)
Gets the map coordinate for the specified page coordinate. |
Point |
toPagePoint(Point mapPoint)
Gets the page coordinate for the specified map coordinate. |
void |
zoomToExtent(double x1,
double y1,
double x2,
double y2)
Changes the extent of the map to the specified extent. |
void |
zoomToExtent(Envelope env)
Changes the extent of the map to the specified extent. |
void |
zoomToPreviousExtent()
Sets the map extent to an extent from the previous extent stack, and removes the extent from the stack. |
void |
zoomToScale(double scale)
Zooms the map extent to display at the specified scale, centered at the same point as before the extent change. |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static int mapid
| Constructor Detail |
public Map()
public Map(java.lang.String outputDir,
java.lang.String outputUrlPath)
outputDir - The directory where temporary images are created.outputUrlPath - The URL path to the temporary directory.| Method Detail |
public Geometry getAreaOfInterest()
public void setAreaOfInterest(Geometry geometry)
geometry - The geometry, or null to clear the geometry.public Color getBackgroundColor()
public void setBackgroundColor(Color color)
color - The background color.public Editing getEditing()
public void setEditing(Editing editing)
editing - The editing settings object.public void addHighlightLayer(WmsLayer layer)
layer - The layer to create highlighting for.public void removeHighlightLayer(WmsLayer layer)
layer - The layer to remove highlighting for.public void addMapScript(java.lang.String scriptName)
scriptName - The file name of the map script. Must be in
the IMF directory or a subdirectory.public java.util.ArrayList getMapScripts()
public java.lang.String getProperty(java.lang.String name)
name - The property name
public void removeProperty(java.lang.String name)
name - The name of the property.
public void setProperty(java.lang.String name,
java.lang.String value)
name - The property namevalue - The property value.public java.lang.String getTempDir()
public void setTempDir(java.lang.String dir)
dir - The name of the temporary directory.public java.lang.String getTempUrlPath()
public void setTempUrlPath(java.lang.String path)
path - The name of the temporary path.public boolean isForwarded()
public void setForwarded(boolean forwarded)
forwarded - True if forwarding should be used, otherwise false.public java.util.Locale getLocale()
public void setLocale(java.util.Locale locale)
locale - The locale object.public void addProjection(Projection prj)
prj - The projection to add.public java.util.HashMap getKnownProjections()
public Projection getProjection(java.lang.String srs)
srs - The spatial reference system code.
public java.awt.image.BufferedImage getImage()
public java.lang.String getImageUrl()
public java.lang.Object clone()
public void addLayer(int index,
Layer layer)
index - The position for the layer. 0 is drawn first.layer - The layer.public void addLayer(Layer layer)
layer - The layer.public java.lang.String getSaxParser()
public void setSaxParser(java.lang.String className)
className - The class name of the SAX parser.public void addService(WfsService service)
service - The service.public void addService(WmsService service)
service - The service.
public void doZoom(double mapX,
double mapY,
double zoomFactor)
mapX - The map centre x coordinate.mapY - The map centre y coordinate.zoomFactor - A number that determines the relative scale for the map.public java.lang.String getAlertMessage()
public java.lang.String getCopyrightOwner()
public Envelope getExtent()
public Folders getFolders()
public Envelope getFullExtent()
public int getHeight()
public Envelope getInitialExtent()
public Layers getLayers()
public java.awt.geom.AffineTransform getMapTransform()
public java.awt.geom.AffineTransform getPageTransform()
public int getMapUnits()
public Envelope getMaximumExtent()
public void setMaximumExtent(Envelope extent)
extent - The extent in an Envelope object.public Projection getProjection()
public java.util.ArrayList getWfsServices()
public WfsService getWfsService(java.lang.String serviceName)
serviceName - The service name.
public java.util.ArrayList getWmsServices()
public WmsService getWmsService(int objectId)
objectId - The id of the service
public WmsService getWmsService(java.lang.String serviceName)
serviceName - The service name.
public int getWidth()
public Projection getCenterCoordinateProjection()
public boolean isCenterCoordinateVisible()
public boolean isCopyrightVisible()
public boolean isNorthArrowVisible()
public void setExtent(Envelope extent)
extent - The extent in an Envelope object.public void setFolders(Folders folders)
folders - The folders.public void setFullExtent(Envelope extent)
extent - The extent in an Envelope object.public void setInitialExtent(Envelope extent)
extent - The extent in an Envelope object.public void setProjection(Projection projection)
projection - The projection.public double getScale()
public double getScale(double scaleFactor)
scaleFactor - Map units per pixel.
public double getScaleFactor()
public double getScaleFactor(double scale)
scale - The scale.
public boolean isScalebarVisible()
public int getScalebarUnits()
public void setScalebarUnits(int units)
units - The units enumerator, see com.moximedia.ows.types.ScalebarUnitsType.public void setScalebarUnits(java.lang.String units)
units - The units string.
public void setSize(int width,
int height)
width - The map width in pixels.height - The map height in pixels.public java.lang.String getSrs()
public void setSrs(java.lang.String srs)
srs - The SRS code.public Point toMapPoint(Point pagePoint)
pagePoint - The page coordinate.
public Point toPagePoint(Point mapPoint)
mapPoint - The map coordinate.
public void zoomToExtent(Envelope env)
env - The extent, in an Envelope object.
public void zoomToExtent(double x1,
double y1,
double x2,
double y2)
x1 - The minimum x value.y1 - The minimum y value.x2 - The maximum x value.y2 - The maximum y value.public void zoomToPreviousExtent()
public void zoomToScale(double scale)
scale - The scale as a number. For 1:10000, use 10000.
public void setXmlAttribute(java.lang.String element,
java.lang.String name,
java.lang.String value)
element - The XML element tag containing this attribute.name - The XML attribute name.value - The XML attribute value.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||