On Fri, Feb 27, 2009 at 02:31:46PM +1300, Robert Connolly wrote:
> 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());
http://dev.openlayers.org/apidocs/files/OpenLayers/Format/GeoJSON-js.html#OpenLayers.Format.GeoJSON.read
"The return depends on the value of the type argument. If type is
âFeatureCollectionâ (the default), the return will be an array
of OpenLayers.Feature.Vector."
feature[0].geometry.transform
Regards,
--
Christopher Schmidt
MetaCarta
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users