org.gwtopenmaps.openlayers.client.format
Class VectorFormat

java.lang.Object
  extended by org.gwtopenmaps.openlayers.client.util.JSObjectWrapper
      extended by org.gwtopenmaps.openlayers.client.OpenLayersObjectWrapper
          extended by org.gwtopenmaps.openlayers.client.format.Format
              extended by org.gwtopenmaps.openlayers.client.format.VectorFormat
Direct Known Subclasses:
GeoJSON, GML, GML2, GML3, KML, WKT

public class VectorFormat
extends Format

Format objects provide support for reading and writing formats for representing vector features (or their geometries). There are different standard formats for representing vector features. For example, WKT GML, and KML. A format object can read and write vector features in a specific format.

Author:
Edwin Commandeur - Atlis EJS

Constructor Summary
protected VectorFormat(JSObject element)
           
 
Method Summary
 VectorFeature[] read(String vectorFormatString)
          Read a String representation of a vector format into an array of vector features.
 String write(VectorFeature vectorFeature)
          Write a VectorFeature in a particular format that depends on the specific format object.
 String write(VectorFeature[] vectorFeatures)
          Write an array of VectorFeature objects in a particular format that depends on the specific format object.
 
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

VectorFormat

protected VectorFormat(JSObject element)
Method Detail

write

public String write(VectorFeature[] vectorFeatures)
Write an array of VectorFeature objects in a particular format that depends on the specific format object. For example, a WKT format object writes the features in Well Known Text format: WKT wktFormat = new WKT(); String wkt = wktFormat.write(vectorFeatures);

Parameters:
vectorFeatures - - an array of vector features
Returns:
a String containing the vector features written in a particular format.

write

public String write(VectorFeature vectorFeature)
Write a VectorFeature in a particular format that depends on the specific format object. For example, a WKT format object writes the features in Well Known Text format: WKT wktFormat = new WKT(); String wkt = wktFormat.write(vectorFeatures);

Parameters:
vectorFeature - - a vector feature
Returns:
a String containing the vector feature written in a particular format.

read

public VectorFeature[] read(String vectorFormatString)
Read a String representation of a vector format into an array of vector features.

Parameters:
vectorFormatString - - String of a particular vector format
Returns:
array of vector features


Copyright © 2011 sourceforge. All Rights Reserved.