org.gwtopenmaps.openlayers.client.layer
Class LayerOptions

java.lang.Object
  extended by org.gwtopenmaps.openlayers.client.util.JSObjectWrapper
      extended by org.gwtopenmaps.openlayers.client.layer.LayerOptions
Direct Known Subclasses:
EventPaneOptions, GMLOptions, HTTPRequestLayerOptions, ImageOptions, MarkersOptions, OSMOptions, TMSOptions, VectorOptions, WFSOptions

public class LayerOptions
extends JSObjectWrapper

Author:
Edwin Commandeur - Atlis EJS Find out about OpenLayers: Why doesn't Layer have a setOptions method like Map? Is the addOptions method comparable?

Constructor Summary
  LayerOptions()
           
protected LayerOptions(JSObject jsObject)
           
 
Method Summary
 void setAlwaysInRange(boolean alwaysInRange)
           
 void setApplyAlphaHack(boolean applyAlphaHack)
           
 void setAttribution(String attribution)
          Sets an attribution block on the map.
 void setDisplayInLayerSwitcher(boolean display)
          Display or hide the name of a Layer in the LayerSwitcher Control.
 void setDisplayOutsideMaxExtent(boolean displayOutsideMaxExtent)
           
 void setGutter(float gutter)
           
 void setIsBaseLayer(boolean isBaseLayer)
          To specify if the layer is a BaseLayer.
 void setLayerOpacity(double opacity)
          A floating point number between 1.0 and 0.0 that specifies the opacity of a Layer.
 void setMaxExtent(Bounds maxExtent)
           
 void setMaxResolution(float maxResolution)
           
 void setMaxScale(float maxScale)
           
 void setMinExtent(Bounds minExtent)
           
 void setMinResolution(float minResolution)
           
 void setMinScale(float minScale)
           
 void setNumZoomLevels(int numZoomLevels)
           
 void setProjection(String projection)
           
 void setResolutions(double[] resolutions)
          For information on how OpenLayers can be configured to use different scales/resolutions, see:
http://trac.openlayers.org/wiki/SettingZoomLevels
 void setScales(float[] scales)
           
 void setTransitionEffect(String transition)
          Deprecated. - use setTransitionEffect(TransitionEffect)
 void setTransitionEffect(TransitionEffect transition)
           
 void setUnits(String units)
           
 void setVisibility(boolean visibility)
          see Layer.
 
Methods inherited from class org.gwtopenmaps.openlayers.client.util.JSObjectWrapper
getJSObject, setJSObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LayerOptions

protected LayerOptions(JSObject jsObject)

LayerOptions

public LayerOptions()
Method Detail

setDisplayInLayerSwitcher

public void setDisplayInLayerSwitcher(boolean display)
Display or hide the name of a Layer in the LayerSwitcher Control. By default a Layer is displayed in the LayerSwitcher Control.

Parameters:
display - - true to display the layer in the LayerSwitcher control, false to hide the layer

setIsBaseLayer

public void setIsBaseLayer(boolean isBaseLayer)
To specify if the layer is a BaseLayer. Only one BaseLayer can be active at a time, IS THIS TRUE?: if a BaseLayer is active it cannot be made invisible Layer. If there is more than one BaseLayer then it is possible to choose between BaseLayers in the LayerSwitcher. The default value for isBaseLayer depends on the type of layer. By default isBaseLayer is true for WMS layers, ... . Since OL 2.8 it is possible to specify on the map that only overlays should be used (will this overrule isBaseLayer property of layer?).


setAttribution

public void setAttribution(String attribution)
Sets an attribution block on the map. For example: "This map is provided by company X."

Parameters:
attribution - - the attribution text

setLayerOpacity

public void setLayerOpacity(double opacity)
A floating point number between 1.0 and 0.0 that specifies the opacity of a Layer.

Parameters:
opacity - - 1.0 = completely opaque, 0.0 = completely non-opaque

setVisibility

public void setVisibility(boolean visibility)
see Layer.

Parameters:
visibility - - Visibility of the layer on the map. Default is true.

setNumZoomLevels

public void setNumZoomLevels(int numZoomLevels)

setDisplayOutsideMaxExtent

public void setDisplayOutsideMaxExtent(boolean displayOutsideMaxExtent)
Parameters:
displayOutsideMaxExtent - - Set true to request map tiles outside the maxExtent of the Layer, default is false.

setApplyAlphaHack

public void setApplyAlphaHack(boolean applyAlphaHack)
Parameters:
applyAlphaHack - - Set true to enable IE6 alpha hack for transparent PNGs. Default is false, because of performance overhead.

setAlwaysInRange

public void setAlwaysInRange(boolean alwaysInRange)

setGutter

public void setGutter(float gutter)
Parameters:
gutter - - The width in pixels of the gutter around the image. The gutter is ignored.
From OpenLayers API: "By setting this property to a non-zero value, images will be requested that are wider and taller than the tile size by a value of 2 x gutter. This allows artifacts of rendering at tile edges to be ignored. Set a gutter value that is equal to half the size of the widest symbol that needs to be displayed. Defaults to zero. Non-tiled layers always have zero gutter."

setProjection

public void setProjection(String projection)
Parameters:
projection - - see MapOptions

setUnits

public void setUnits(String units)
Parameters:
units - - see MapOptions

setMaxExtent

public void setMaxExtent(Bounds maxExtent)
Parameters:
maxExtent - - see MapOptions.setMaxExtent(Bounds)

setMinExtent

public void setMinExtent(Bounds minExtent)
Parameters:
minExtent - - see MapOptions.setMinExtent(Bounds)

setMaxResolution

public void setMaxResolution(float maxResolution)
Parameters:
maxResolution - - see MapOptions.setMaxResolution(float)

setMinResolution

public void setMinResolution(float minResolution)
Parameters:
minResolution - - see MapOptions.setMinResolution(float)

setMaxScale

public void setMaxScale(float maxScale)

setMinScale

public void setMinScale(float minScale)

setScales

public void setScales(float[] scales)

setTransitionEffect

public void setTransitionEffect(String transition)
Deprecated. - use setTransitionEffect(TransitionEffect)

Parameters:
transition - - document supported transition effects here

setTransitionEffect

public void setTransitionEffect(TransitionEffect transition)

setResolutions

public void setResolutions(double[] resolutions)
For information on how OpenLayers can be configured to use different scales/resolutions, see:
http://trac.openlayers.org/wiki/SettingZoomLevels

Parameters:
resolutions - -array of resolutions


Copyright © 2011 sourceforge. All Rights Reserved.