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.
|
Method Summary |
VectorFeature[] |
read(java.lang.String vectorFormatString)
Read a String representation of a vector format into an array of vector features. |
java.lang.String |
write(VectorFeature vectorFeature)
Write a VectorFeature in a
particular format that depends on the specific format object. |
java.lang.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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VectorFormat
protected VectorFormat(JSObject element)
write
public java.lang.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 java.lang.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(java.lang.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