[OpenLayers-Users] feature.geometry does not exist
Robert Connolly
r.connolly at auckland.ac.nz
Thu Feb 26 20:31:46 EST 2009
Hi Everyone,
I'm attempting to read some features from a GeoJSON encoded object
transform them for the correct projection and add them to a vector
layer, like so:
var feature = geojson_format.read(data[j]);
feature.geometry.transform(new OpenLayers.Projection("EPSG:4326"),
map.getProjectionObject());
vector_layer2.addFeatures(feature);
However, calling feature.geometry.transfom() gives me the following
error in firebug:
feature.geometry is undefined
Can anyone tell me what's going on? I'm using OL 2.7.
Regards,
Rob Connolly
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090227/ce24de5a/attachment.html
More information about the Users
mailing list