|
deegree 2.5 (2011/06/29 09:44 build-8-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MapModelAccess
This interface defines access to the model (
) a map based on. A concret implementation is
responsible for handling the context. E.g. an implementation may adds additional
capabilities like a history function.
Several methods expects beside the name of a layer the address (URL) of the OWS that serves
this layer. This is required because a ViewContext may offeres layers from more than one OWS
and there is no rule that says that a layers name must be unique across several OWS. So the
only way to identify a layer is to use the combination of layer name, service address and
service type (maybe several services are published to the same address; e.g. deegree 2 will
do this).
Notice: All changed e.g. removeLayer just will be made to a ViewContext and not to the
service providing a layer.
Field Summary | |
---|---|
static int |
PAN_EAST
The pan east constant. |
static int |
PAN_NORTH
The pan north constant. |
static int |
PAN_NORTHEAST
The pan north east constant. |
static int |
PAN_NORTHWEST
The pan north west constant. |
static int |
PAN_SOUTH
The pan south constant. |
static int |
PAN_SOUTHEAST
The pan south east constant. |
static int |
PAN_SOUTHWEST
The pan south west constant. |
static int |
PAN_WEST
The pan west constant. |
Method Summary | |
---|---|
ViewContext |
addCRSToLayer(java.lang.String name,
java.net.URL owsAddress,
java.lang.String type,
java.lang.String crsName)
Adds a CRS to a layer if a ViewContext. |
ViewContext |
addFormatToLayer(java.lang.String name,
java.net.URL owsAddress,
java.lang.String type,
java.lang.String mimeType)
adds a new image format to a layer of a ViewContext. |
ViewContext |
addLayer(int index,
Layer layer)
adds a layer to the defined index position of the layer list of a ViewContext . |
ViewContext |
addLayer(int index,
QualifiedName name,
java.net.URL owsAddress,
java.lang.String type)
adds a layer provided by the passed OWS to the defined index position of the layer list of a ViewContext . |
ViewContext |
addLayer(Layer layer)
adds a layer to the end of the layer list of a ViewContext . |
ViewContext |
addLayer(QualifiedName name,
java.net.URL owsAddress,
java.lang.String type)
adds a layer provided by the passed OWS to the end of the layer list of a ViewContext . |
ViewContext |
addLayers(Layer[] layers)
adds a number of layers to the end of the layer list of a ViewContext . |
ViewContext |
addLayers(QualifiedName[] names,
java.net.URL[] owsAddresses,
java.lang.String type)
adds a number of layers provided by the passed OWS to the end of the layer list of a ViewContext . |
ViewContext |
addStyleToLayer(QualifiedName name,
java.net.URL owsAddress,
java.lang.String type,
java.lang.String styleName)
adds a named style to a layer to be available within a context. |
ViewContext |
assignSLDToLayer(QualifiedName name,
java.net.URL owsAddress,
java.lang.String type,
StyledLayerDescriptor sld)
assignes a SLD document instead of a style to a layer. |
ViewContext |
destroyGroup(java.lang.String groupName)
destroys a group. |
ViewContext |
groupLayers(int first,
int last,
java.lang.String groupName,
java.lang.String parentGroupName)
the difference to |
ViewContext |
groupLayers(java.lang.String[] layers,
java.net.URL[] owsAddresses,
java.lang.String[] types,
java.lang.String groupName,
java.lang.String parentGroupName)
groups a set of layers identified by their names, the address of the OWS that provides it und its type. |
ViewContext |
pan(double directionDegree,
double factor)
moves a map view to a free definable direction with a given factor |
ViewContext |
pan(int direction,
double factor)
moves the boundingbox of the map to a well known direction. |
ViewContext |
recenterMap(java.awt.Point point)
centers he map described by a ViewContext to the passed point. |
ViewContext |
recenterMap(Point point)
centers he map described by a ViewContext to the passed point. |
ViewContext |
removeCRSFromLayer(java.lang.String name,
java.net.URL owsAddress,
java.lang.String type,
java.lang.String crsName)
removes a CRS from the list of availabe CRS of a layer. |
ViewContext |
removeFormatFromLayer(java.lang.String name,
java.net.URL owsAddress,
java.lang.String type,
java.lang.String mimeType)
removes a format from a layer in a ViewContext. |
ViewContext |
removeLayer(QualifiedName name,
java.net.URL owsAddress,
java.lang.String type)
removes a named layer served by the passsed OWS from a ViewContext . if a
layer with this name does not exist in a context, the unchanged ViewContext
will be returned |
ViewContext |
removeStyleFromLayer(QualifiedName name,
java.net.URL owsAddress,
java.lang.String type,
java.lang.String styleName)
removes a style from the layer defined in a ViewContext. |
ViewContext |
setCurrentMapFormat(java.lang.String mimeType,
java.net.URL owsAddress,
java.lang.String type)
sets the current image format a map shall be rendered. |
ViewContext |
setLayerActiveStyle(QualifiedName name,
java.net.URL owsAddress,
java.lang.String type,
java.lang.String styleName)
sets the active style (style to be used for rendering) of a layer |
ViewContext |
setLayers(Layer[] layers)
sets the layers to a ViewContext . |
ViewContext |
setLayers(QualifiedName[] names,
java.net.URL[] owsAddresses,
java.lang.String type)
sets the layers provided by the passed OWS to a ViewContext . |
ViewContext |
setLayersVisible(java.lang.String name,
java.net.URL owsAddress,
java.lang.String type,
boolean visible)
set a layer to be visible or invisible |
ViewContext |
setMapBoundingBox(Envelope boundingBox)
sets the bounding box a map/VieContext |
ViewContext |
setMapCRS(java.lang.String crs)
sets the CRS to be used by the map created from a ViewContext. |
ViewContext |
setMapSize(int width,
int height)
sets the width and height of a map described by a ViewContext |
ViewContext |
swapGroups(QualifiedName name,
boolean up)
swaps to groups in their order |
ViewContext |
swapLayers(QualifiedName name,
java.net.URL owsAddress,
java.lang.String type,
boolean up)
swaps two layers in their order. |
ViewContext |
zoom(java.awt.Point point,
double factor)
zoom in or out of the map described by a ViewContext and recenters it to the passed point. |
ViewContext |
zoom(Point point,
double factor)
zoom in or out of the map described by a ViewContext and recenters it to the passed point. |
Field Detail |
---|
static final int PAN_NORTH
static final int PAN_NORTHEAST
static final int PAN_NORTHWEST
static final int PAN_SOUTH
static final int PAN_SOUTHEAST
static final int PAN_SOUTHWEST
static final int PAN_WEST
static final int PAN_EAST
Method Detail |
---|
ViewContext setLayers(QualifiedName[] names, java.net.URL[] owsAddresses, java.lang.String type) throws PortalException
ViewContext
. A layer may be a
WMS layer, a WFS feature type or a WCS coverage.
names
- names of the layerowsAddresses
- addresses of the OWS that serves the layer. each passed layername is assigned to
the OWS URL at the same index position.type
- OWS type (WCS, WMS or WFS)
PortalException
- will be thrown if of the layers already is registered to a ViewContext or the OWS
does not serves one the layers or names
and owsAddresses
are not of the same size.
ViewContext setLayers(Layer[] layers) throws PortalException
ViewContext
. A layer may be a WMS layer, a WFS feature
type or a WCS coverage.
layers
- layers to add
PortalException
- will be thrown if of the layers already is registered to a ViewContext.ViewContext addLayer(QualifiedName name, java.net.URL owsAddress, java.lang.String type) throws PortalException
ViewContext
. A layer may be a WMS layer, a WFS feature type or a WCS
coverage.
name
- name of the layerowsAddress
- address of the OWS that serves the layertype
- OWS type (WCS, WMS or WFS)
PortalException
- will be thrown if the layer already is registered to a ViewContext or the OWS
does not serves a layer with this name.ViewContext addLayer(Layer layer) throws PortalException
ViewContext
. A layer may be a
WMS layer, a WFS feature type or a WCS coverage.
layer
- layer to add
PortalException
- will be thrown if the layer already is registered to a ViewContext.ViewContext addLayer(int index, QualifiedName name, java.net.URL owsAddress, java.lang.String type) throws PortalException
ViewContext
. A layer may be a WMS layer, a WFS feature type or a WCS
coverage.
index
- index position where to insert the layername
- name of the layerowsAddress
- address of the OWS that serves the layertype
- OWS type (WCS, WMS or WFS)
PortalException
- will be thrown if the layer already is registered to a ViewContext or the OWS
does not serves a layer with this name or the index is < 0 or > the number
of layers -1;ViewContext addLayer(int index, Layer layer) throws PortalException
ViewContext
.
A layer may be a WMS layer, a WFS feature type or a WCS coverage.
index
- index position where to insert the layerlayer
- layer to add
PortalException
- will be thrown if the layer already is registered to a ViewContext or the index
is < 0 or > the number of layers -1;ViewContext addLayers(QualifiedName[] names, java.net.URL[] owsAddresses, java.lang.String type) throws PortalException
ViewContext
. A layer may be a WMS layer, a WFS feature type or a WCS
coverage.
names
- names of the layerowsAddresses
- addresses of the OWS's that serves the layertype
- OWS type (WCS, WMS or WFS)
PortalException
- will be thrown if of the layers already is registered to a ViewContext or the OWS
does not serves one the layers or the OWS does not serves one the layers or
names
and owsAddresses
are not of the same size.
ViewContext addLayers(Layer[] layers) throws PortalException
ViewContext
. A
layer may be a WMS layer, a WFS feature type or a WCS coverage.
layers
- layers to add
PortalException
- will be thrown if of the layers already is registered to a ViewContext.ViewContext removeLayer(QualifiedName name, java.net.URL owsAddress, java.lang.String type)
ViewContext
. if a
layer with this name does not exist in a context, the unchanged ViewContext
will be returned
name
- name of the layer to be removedowsAddress
- address of the OWS that serves the layertype
- OWS type (WCS, WMS or WFS)
ViewContext swapLayers(QualifiedName name, java.net.URL owsAddress, java.lang.String type, boolean up) throws PortalException
ViewContext
will be returned
Notice: if to layers to be swaped are served by differend OWS at least one new image-layer must be created by the client.
name
- name of the layer to be moved up or down in the listowsAddress
- address of the OWS that serves the layertype
- OWS type (WCS, WMS or WFS)up
- true if layer should be moved up otherwise it will be moved down.
PortalException
- will be thrown if the layer does not exists in a ViewContext.ViewContext swapGroups(QualifiedName name, boolean up) throws PortalException
name
- name of the group to be moved up or downup
- true if a group should be moved up otherwise it will be moved down.
PortalException
- will be thrown if a group with the passed name does not exist in a ViewContextswapLayers(QualifiedName, URL, String, boolean)
ViewContext setLayerActiveStyle(QualifiedName name, java.net.URL owsAddress, java.lang.String type, java.lang.String styleName) throws PortalException
name
- name of the layer a style shall be set toowsAddress
- address of the OWS that serves this layertype
- OWS type (WCS, WMS or WFS)styleName
- name of the style to be assigned
PortalException
- will be thrown if the layer or style are not known by a ViewContext or the style
is not available for this layerViewContext addStyleToLayer(QualifiedName name, java.net.URL owsAddress, java.lang.String type, java.lang.String styleName) throws PortalException
name
- name of the layerowsAddress
- address of the OWS that serves this layertype
- OWS type (WCS, WMS or WFS)styleName
- name of the style to be set
PortalException
- will be thrown if the layer is not known by a ViewContext or the style is not
available for this layerViewContext removeStyleFromLayer(QualifiedName name, java.net.URL owsAddress, java.lang.String type, java.lang.String styleName)
name
- name of the layerowsAddress
- address of the OWS that serves this layertype
- OWS type (WCS, WMS or WFS)styleName
- name of the style to be removed
ViewContext assignSLDToLayer(QualifiedName name, java.net.URL owsAddress, java.lang.String type, StyledLayerDescriptor sld) throws PortalException
name
- name of the layer the SLD should be assigned toowsAddress
- address of the OWS that serves this layer(s) if the SLD contains named layer(s).
Otherwise the parameter can be null
type
- OWS type (WCS, WMS or WFS)sld
- SLD that shall be assigned
PortalException
- will be thrown if the layer is not known by a ViewContext or if the SLD contains
a named layer but owsAddress is passed.ViewContext setLayersVisible(java.lang.String name, java.net.URL owsAddress, java.lang.String type, boolean visible) throws PortalException
name
- name of the layerowsAddress
- address of the OWS that serves this layertype
- OWS type (WCS, WMS or WFS)visible
- true
if a layer shall be visible; false
if not.
PortalException
- will be thrown if the layer is not known by a ViewContext.ViewContext setMapCRS(java.lang.String crs) throws PortalException
crs
- name of the CRS e.g. EPSG:4326
PortalException
- will be thrown if the CRS is not known by all layers available through a
ViewContextViewContext addCRSToLayer(java.lang.String name, java.net.URL owsAddress, java.lang.String type, java.lang.String crsName) throws PortalException
name
- name of the layerowsAddress
- address of the OWS that serves this layertype
- OWS type (WCS, WMS or WFS)crsName
- name of the CRS to be added (e.g. EPSG:4326)
PortalException
- will be thrown if the layer is not known by a ViewContext or the CRS is not
supported for this layer/OWSViewContext removeCRSFromLayer(java.lang.String name, java.net.URL owsAddress, java.lang.String type, java.lang.String crsName)
name
- name of the layerowsAddress
- address of the OWS that serves this layertype
- OWS type (WCS, WMS or WFS)crsName
- name of the CRS to be removed from a layers CRS list
ViewContext setMapBoundingBox(Envelope boundingBox) throws ContextException
boundingBox
- new boundingbox
ContextException
ViewContext setMapSize(int width, int height) throws PortalException
width
- map width measured in pixelheight
- map height measured in pixel
PortalException
- will be thrown if width or height < 1 (even a width or height of 1 pixel is not
really useful but formal it is valid);ViewContext zoom(java.awt.Point point, double factor) throws ContextException
factor
- zoom factor in % of the boundingbox sizepoint
- point (pixel coordinates) of the current map that marks the new center of the map
ContextException
ViewContext zoom(Point point, double factor) throws ContextException
factor
- zoom factor in % of the boundingbox sizepoint
- point (map coordinates) of the current map that marks the new center of the map
ContextException
ViewContext recenterMap(java.awt.Point point) throws ContextException
point
- point (pixel coordinates) of the current map that marks the new center of the map
ContextException
with a passed factor == 0;
ViewContext recenterMap(Point point) throws ContextException
point
- point (map coordinates) of the current map that marks the new center of the map
ContextException
with a passed factor == 0;
ViewContext pan(int direction, double factor) throws PortalException, ContextException
direction
- direction the map view shall be moved tofactor
- factor measured in % the map view shall be moved
PortalException
- will be thrown if passed direction is not valid or factor is <= 0
ContextException
PAN_NORTH
,
PAN_NORTHEAST
,
PAN_NORTHWEST
,
PAN_SOUTH
,
PAN_SOUTHEAST
,
PAN_SOUTHWEST
,
PAN_WEST
,
PAN_EAST
ViewContext pan(double directionDegree, double factor) throws PortalException
directionDegree
- direction measured in degree that map view shall be moved tofactor
- factor measured in % the map view shall be moved
PortalException
- will be thrown if factor is <= 0ViewContext setCurrentMapFormat(java.lang.String mimeType, java.net.URL owsAddress, java.lang.String type) throws PortalException
mimeType
- image formatowsAddress
- address of the OWS the format shall be used fortype
- OWS type
PortalException
- will be thrown if the passed mimeType is not suported by the passed OWS or one of
its layers as defined in a ViewContextViewContext addFormatToLayer(java.lang.String name, java.net.URL owsAddress, java.lang.String type, java.lang.String mimeType) throws PortalException
name
- name of the layerowsAddress
- address of the OWStype
- OWS type (WCS, WMS or WFS)mimeType
- new format to add to the layer
PortalException
- will be thrown if the passed mimeType is not suported by the passed OWSViewContext removeFormatFromLayer(java.lang.String name, java.net.URL owsAddress, java.lang.String type, java.lang.String mimeType) throws PortalException
name
- name of the layerowsAddress
- address of the OWStype
- OWS type (WCS, WMS or WFS)mimeType
- format to be removed
PortalException
- will be thrown if the removed format is the current format of the layer.addFormatToLayer(String, URL, String, String)
ViewContext groupLayers(java.lang.String[] layers, java.net.URL[] owsAddresses, java.lang.String[] types, java.lang.String groupName, java.lang.String parentGroupName) throws PortalException
null
.
If no parent is given the group will be located underneath the root node.
layers
- layers to be grouped.owsAddresses
- types
- groupName
- unique name of the groupparentGroupName
- name of the parent group. may be null
- Returns:
- modified ViewContext
- Throws:
PortalException
- will be thrown if one of the layers is not served by
the assigned OWS or a layer is already member of a
group
ViewContext groupLayers(int first, int last, java.lang.String groupName, java.lang.String parentGroupName) throws PortalException
first
- zero based index of the first layer to add to the grouplast
- zero based index of the last layer to add to the groupgroupName
- unique name of the groupparentGroupName
- name of the parent group. may be null
- Returns:
- modified ViewContext
- Throws:
PortalException
- will be thrown if first or last is < 0 or larger
than the total number of layers -1 or a layer is
already member of a group- See Also:
is that the layers are
identified by theri index position in a ViewContext
ViewContext destroyGroup(java.lang.String groupName)
groupName
- name of the group to be removed
|
deegree 2.5 (2011/06/29 09:44 build-8-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org