[OpenLayers-Users] Format.WKT.write method
Tim Schaub
noreply at geocartic.com
Wed May 16 19:08:35 EDT 2007
Hey-
Simon Cantem wrote:
> ... I’ve noticed that unlike the other Format
> classes, it expects a either a geometry object or an array of geometry
> objects, the other Format classes (eg Format.GML and Format.WFS) expect
> a features array.
I agree. This is weird.
Since WKT is about geometries (and doesn't have a place for feature
attributes), I made it read and write geometries (in the OpenLayers sense).
However, I agree that the serializer/deserializer should deal in
features - since people should seldom be dealing with geometries
(especially collections of geometry) in OpenLayers.
I've created a ticket and patch that changes the behavior of the WKT
format. If approved, wkt.read() will return a feature or array of
features and wkt.write() will take a feature or array of features.
Let me know what you think,
Tim
More information about the Users
mailing list