deegree 2.3 (2010/04/09 10:10 build-4-official)

org.deegree.portal.context
Class MapParameter

java.lang.Object
  extended by org.deegree.portal.context.MapParameter

public class MapParameter
extends Object

encapsulates the part of the general web map context extension parameters that targets the map operation and feature info format options. These are informations about the possible values and the current selected value for each of the encapsulated parameters:

feature info formats

pan factors (% of the map size)

zoom factors (% of the map factors)

minimum displayable scale (WMS scale definition)

maximum displayable scale (WMS scale definition)

Version:
$Revision: 18195 $
Author:
Andreas Poth

Constructor Summary
MapParameter(Format[] offeredInfoFormats, MapOperationFactor[] offeredPanFactors, MapOperationFactor[] offeredZoomFactors, double minScale, double maxScale)
          Creates a new MapParameter object.
 
Method Summary
 void addInfoFormat(Format infoFormat)
          adds an info format to a map context
 void addPanFactor(MapOperationFactor panFactor)
          add a pan factor to a map context
 void addZoomFactor(MapOperationFactor zoomFactor)
          adds a zoom factor to a map context
 String exportAsXML()
           
 double getMaxScale()
          returns the maximum map scale as defined at the OGC WMS specs that is offered by the map context
 double getMinScale()
          returns the minimum map scale as defined at the OGC WMS specs that is offered by the map context
 Format[] getOfferedInfoFormats()
          returns the list of map formats offered by the map context
 MapOperationFactor[] getOfferedPanFactors()
          returns the list of pan factors offered by this map context
 MapOperationFactor[] getOfferedZoomFactors()
          returns the list of zoom factors offered by the map context
 Format getSelectedInfoFormat()
          returns the info format that is marked as selected.
 MapOperationFactor getSelectedPanFactor()
          returns the pan factor that is marked as selected.
 MapOperationFactor getSelectedZoomFactor()
          returns the zoom factor that is marked as selected.
 void removeInfoFormat(Format format)
          removes an info format from a map context
 void removePanFactor(MapOperationFactor panFactor)
          removes a pan factor from a context
 void removeZoomFactor(MapOperationFactor zoomFactor)
          removes a zomm factor from a map context
 void setMaxScale(double maxScale)
          sets the maximum map scale as defined at the OGC WMS specs that is offered by the map context
 void setMinScale(double minScale)
          sets the minimum map scale as defined at the OGC WMS specs that is offered by the map context
 void setOfferedInfoFormats(Format[] infoFormats)
          sets the info formats offered by a map context
 void setOfferedPanFactors(MapOperationFactor[] panFactors)
          sets the offered pan factors (% of the map size) for a map context
 void setOfferedZoomFactors(MapOperationFactor[] zoomFactors)
          sets the offered zoom factors (% of the map size) for a map context
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapParameter

public MapParameter(Format[] offeredInfoFormats,
                    MapOperationFactor[] offeredPanFactors,
                    MapOperationFactor[] offeredZoomFactors,
                    double minScale,
                    double maxScale)
Creates a new MapParameter object.

Parameters:
offeredInfoFormats - feature info formats
offeredPanFactors - pan factors (% of the map size)
offeredZoomFactors - pan factors (% of the map size)
minScale - minimum displayable scale (WMS scale definition)
maxScale - maximum displayable scale (WMS scale definition)
Method Detail

setOfferedPanFactors

public void setOfferedPanFactors(MapOperationFactor[] panFactors)
sets the offered pan factors (% of the map size) for a map context

Parameters:
panFactors -

addPanFactor

public void addPanFactor(MapOperationFactor panFactor)
add a pan factor to a map context

Parameters:
panFactor -

getOfferedPanFactors

public MapOperationFactor[] getOfferedPanFactors()
returns the list of pan factors offered by this map context

Returns:
list of pan factors offered by this map context

getSelectedPanFactor

public MapOperationFactor getSelectedPanFactor()
returns the pan factor that is marked as selected. If no pan factor is marked, the first pan factor will be returned.

Returns:
pan factor that is marked as selected

removePanFactor

public void removePanFactor(MapOperationFactor panFactor)
                     throws ContextException
removes a pan factor from a context

Parameters:
panFactor -
Throws:
ContextException - if the map operation factior is selected.

setOfferedZoomFactors

public void setOfferedZoomFactors(MapOperationFactor[] zoomFactors)
sets the offered zoom factors (% of the map size) for a map context

Parameters:
zoomFactors -

addZoomFactor

public void addZoomFactor(MapOperationFactor zoomFactor)
adds a zoom factor to a map context

Parameters:
zoomFactor -

getOfferedZoomFactors

public MapOperationFactor[] getOfferedZoomFactors()
returns the list of zoom factors offered by the map context

Returns:
list of zoom factors offered by the map context

getSelectedZoomFactor

public MapOperationFactor getSelectedZoomFactor()
returns the zoom factor that is marked as selected. If no zoom factor is marked, the first zoom factor will be returned.

Returns:
zoom factor that is marked as selected

removeZoomFactor

public void removeZoomFactor(MapOperationFactor zoomFactor)
                      throws ContextException
removes a zomm factor from a map context

Parameters:
zoomFactor -
Throws:
ContextException - if the map operation factor is selected.

setOfferedInfoFormats

public void setOfferedInfoFormats(Format[] infoFormats)
sets the info formats offered by a map context

Parameters:
infoFormats -

addInfoFormat

public void addInfoFormat(Format infoFormat)
adds an info format to a map context

Parameters:
infoFormat -

getOfferedInfoFormats

public Format[] getOfferedInfoFormats()
returns the list of map formats offered by the map context

Returns:
list of map formats offered by the map context

getSelectedInfoFormat

public Format getSelectedInfoFormat()
returns the info format that is marked as selected. If no info format is marked, the first info format will be returned.

Returns:
info format that is marked as selected

removeInfoFormat

public void removeInfoFormat(Format format)
                      throws ContextException
removes an info format from a map context

Parameters:
format -
Throws:
ContextException - the format is the current format.

getMinScale

public double getMinScale()
returns the minimum map scale as defined at the OGC WMS specs that is offered by the map context

Returns:
minimum scale

setMinScale

public void setMinScale(double minScale)
sets the minimum map scale as defined at the OGC WMS specs that is offered by the map context

Parameters:
minScale -

getMaxScale

public double getMaxScale()
returns the maximum map scale as defined at the OGC WMS specs that is offered by the map context

Returns:
maximum scale

setMaxScale

public void setMaxScale(double maxScale)
sets the maximum map scale as defined at the OGC WMS specs that is offered by the map context

Parameters:
maxScale -

exportAsXML

public String exportAsXML()
Returns:
XML coded

deegree 2.3 (2010/04/09 10:10 build-4-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org