org.gwtopenmaps.openlayers.client.format
Class VectorFormat
java.lang.Object
org.gwtopenmaps.openlayers.client.util.JSObjectWrapper
org.gwtopenmaps.openlayers.client.OpenLayersObjectWrapper
org.gwtopenmaps.openlayers.client.format.Format
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VectorFormat
protected VectorFormat(JSObject element)
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.