org.gwtopenmaps.openlayers.client.feature
Class VectorFeature

java.lang.Object
  extended by org.gwtopenmaps.openlayers.client.util.JSObjectWrapper
      extended by org.gwtopenmaps.openlayers.client.OpenLayersObjectWrapper
          extended by org.gwtopenmaps.openlayers.client.feature.Feature
              extended by org.gwtopenmaps.openlayers.client.feature.VectorFeature

public class VectorFeature
extends Feature

Author:
Edwin Commandeur - Atlis EJS Class name deviates intentionally from OpenLayers class name. Both vector layers and vector features are called Vector in OpenLayers.

Constructor Summary
  VectorFeature(Geometry g)
           
  VectorFeature(Geometry g, Style s)
           
protected VectorFeature(JSObject vectorFeature)
           
 
Method Summary
 Attributes getAttributes()
           
 Attributes getAttributes(VectorFeature attributes)
          Deprecated. 
 Geometry getGeometry()
          Get vector feature geometry.
static VectorFeature narrowToVectorFeature(JSObject vectorFeature)
           
 void setAttributes(Attributes attributes)
          Set the attributes.
 
Methods inherited from class org.gwtopenmaps.openlayers.client.feature.Feature
createPopup, destroy, getCenterLonLat, getFeatureId, getFID, getPopup, resetPopup, setPopup, setStyle
 
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

VectorFeature

protected VectorFeature(JSObject vectorFeature)

VectorFeature

public VectorFeature(Geometry g)

VectorFeature

public VectorFeature(Geometry g,
                     Style s)
Method Detail

narrowToVectorFeature

public static VectorFeature narrowToVectorFeature(JSObject vectorFeature)

getGeometry

public Geometry getGeometry()
Get vector feature geometry. Example: VectorFeature vf = wkt.read("POINT (1 2)"); Geometry g = vf.getGeometry(); if(g.getClassName().equals(Geometry.POINT_CLASS_NAME){ Point p = Point.narrowToPoint(g.getJSObject()); };


setAttributes

public void setAttributes(Attributes attributes)
Set the attributes. This object (attributes) holds arbitrary properties that describe the feature.

Note: the attributes are only applied for styles defined inside a StyleMap. If just using a single style for the VectorOptions the attributes will be ignored.

Parameters:
vectorFeatureAttributes - The attributes to set

getAttributes

public Attributes getAttributes()
Returns:
Attributes object

getAttributes

@Deprecated
public Attributes getAttributes(VectorFeature attributes)
Deprecated. 



Copyright © 2010 sourceforge. All Rights Reserved.