org.gwtopenmaps.openlayers.client.layer
Class Vector

java.lang.Object
  extended by org.gwtopenmaps.openlayers.client.util.JSObjectWrapper
      extended by org.gwtopenmaps.openlayers.client.OpenLayersObjectWrapper
          extended by org.gwtopenmaps.openlayers.client.OpenLayersEObjectWrapper
              extended by org.gwtopenmaps.openlayers.client.layer.Layer
                  extended by org.gwtopenmaps.openlayers.client.layer.Vector
Direct Known Subclasses:
GML, WFS

public class Vector
extends Layer

Author:
Erdem Gunay, Edwin Commandeur - Atlis EJS, Curtis Jensen, Lukas Johansson

Field Summary
 
Fields inherited from class org.gwtopenmaps.openlayers.client.layer.Layer
ARCGIS93REST_CLASS_NAME, BOXES_CLASS_NAME, GOOGLE_CLASS_NAME, GRIDLAYER_CLASS_NAME, HTTPREQUESTLAYER_CLASS_NAME, IMAGE_CLASS_NAME, MARKERS_CLASS_NAME, OSM_CLASS_NAME, TMS_CLASS_NAME, VECTOR_CLASS_NAME, WMS_CLASS_NAME, XYZ_CLASS_NAME
 
Fields inherited from class org.gwtopenmaps.openlayers.client.OpenLayersEObjectWrapper
eventListeners
 
Constructor Summary
protected Vector(JSObject vector)
           
  Vector(String name)
           
  Vector(String name, VectorOptions options)
           
 
Method Summary
 void addFeature(VectorFeature f)
           
 void addFeatures(VectorFeature[] features)
           
 void addVectorAfterFeatureModifiedListener(VectorAfterFeatureModifiedListener listener)
          Add Listener for AfterModifiedEvent
 void addVectorBeforeFeatureAddedListener(VectorBeforeFeatureAddedListener listener)
           
 void addVectorBeforeFeatureModifiedListener(VectorBeforeFeatureModifiedListener listener)
          Add Listener for BeforeModifiedEvent
 void addVectorFeatureAddedListener(VectorFeatureAddedListener listener)
           
 void addVectorFeatureModifiedListener(VectorFeatureModifiedListener listener)
           
 void addVectorFeatureRemovedListener(VectorFeatureRemovedListener listener)
           
 void addVectorFeatureSelectedListener(VectorFeatureSelectedListener listener)
           
 void addVectorFeatureUnselectedListener(VectorFeatureUnselectedListener listener)
           
 void addVectorVertexModifiedListener(VectorVertexModifiedListener listener)
          Add Listener for VertexModifiedEvent
 void destroyFeatures()
          Destroy all features in the vector layer
 void drawFeature(VectorFeature vector, Style style)
           
 void eraseFeatures()
           
 Bounds getDataExtent()
          Calculates the max extent which includes all of the features of this vetor layer.
 VectorFeature getFeatureById(String id)
           
 VectorFeature[] getFeatures()
           
 int getNumberOfFeatures()
           
 OpenLayersObjectWrapper getProtocol()
           
 VectorFeature[] getSelectedFeatures()
           
 Style getStyle()
           
 StyleMap getStyleMap()
           
static Vector narrowToVector(JSObject vectorLayer)
           
 boolean redraw()
           
 void removeFeature(VectorFeature feature)
           
 void setStyle(Style style)
           
 void setStyleMap(StyleMap styleMap)
           
 
Methods inherited from class org.gwtopenmaps.openlayers.client.layer.Layer
addLayerLoadCancelListener, addLayerLoadEndListener, addLayerLoadStartListener, addLayerVisibilityChangedListener, addOptions, displayInLayerSwitcher, getId, getName, getOpacity, getZIndex, isBaseLayer, isVisible, narrowToLayer, setDisplayInLayerSwitcher, setIsBaseLayer, setIsVisible, setName, setOpacity, setZIndex
 
Methods inherited from class org.gwtopenmaps.openlayers.client.OpenLayersEObjectWrapper
getListeners, narrowToOpenLayersEObjectWrapper, removeListener
 
Methods inherited from class org.gwtopenmaps.openlayers.client.OpenLayersObjectWrapper
getClassName, getEvents, narrowToOpenLayersObjectWrapper
 
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

Vector

protected Vector(JSObject vector)

Vector

public Vector(String name)

Vector

public Vector(String name,
              VectorOptions options)
Method Detail

narrowToVector

public static Vector narrowToVector(JSObject vectorLayer)

addFeatures

public void addFeatures(VectorFeature[] features)

addFeature

public void addFeature(VectorFeature f)

redraw

public boolean redraw()
Overrides:
redraw in class Layer

drawFeature

public void drawFeature(VectorFeature vector,
                        Style style)

eraseFeatures

public void eraseFeatures()

removeFeature

public void removeFeature(VectorFeature feature)

getNumberOfFeatures

public int getNumberOfFeatures()

getProtocol

public OpenLayersObjectWrapper getProtocol()

setStyle

public void setStyle(Style style)

getStyle

public Style getStyle()

setStyleMap

public void setStyleMap(StyleMap styleMap)

getStyleMap

public StyleMap getStyleMap()

getFeatures

public VectorFeature[] getFeatures()
Returns:
Array of VectorFeature objects or null if layer does not contain any features

destroyFeatures

public void destroyFeatures()
Destroy all features in the vector layer


getFeatureById

public VectorFeature getFeatureById(String id)

getSelectedFeatures

public VectorFeature[] getSelectedFeatures()

addVectorFeatureModifiedListener

public void addVectorFeatureModifiedListener(VectorFeatureModifiedListener listener)

addVectorFeatureAddedListener

public void addVectorFeatureAddedListener(VectorFeatureAddedListener listener)

addVectorFeatureRemovedListener

public void addVectorFeatureRemovedListener(VectorFeatureRemovedListener listener)

addVectorFeatureSelectedListener

public void addVectorFeatureSelectedListener(VectorFeatureSelectedListener listener)

addVectorFeatureUnselectedListener

public void addVectorFeatureUnselectedListener(VectorFeatureUnselectedListener listener)

addVectorBeforeFeatureAddedListener

public void addVectorBeforeFeatureAddedListener(VectorBeforeFeatureAddedListener listener)

addVectorAfterFeatureModifiedListener

public void addVectorAfterFeatureModifiedListener(VectorAfterFeatureModifiedListener listener)
Add Listener for AfterModifiedEvent

Parameters:
listener -

addVectorBeforeFeatureModifiedListener

public void addVectorBeforeFeatureModifiedListener(VectorBeforeFeatureModifiedListener listener)
Add Listener for BeforeModifiedEvent

Parameters:
listener -

addVectorVertexModifiedListener

public void addVectorVertexModifiedListener(VectorVertexModifiedListener listener)
Add Listener for VertexModifiedEvent

Parameters:
listener -

getDataExtent

public Bounds getDataExtent()
Calculates the max extent which includes all of the features of this vetor layer.

Returns:
The bounds of the max extend calculated


Copyright © 2011 sourceforge. All Rights Reserved.