How to convert Coorinates of VectorFeatures or Layer in OpenLayers from one projection to another?

StackOverflow https://stackoverflow.com/questions/10206335

  •  01-06-2021
  •  | 
  •  

Question

I'm using GWT-OpenLayers in my project and i have problems with converting coordinates. I know how to do this for single point transform(from,to) but can i do this without applyinng for each point? Right now i'm parsing KLM data to get list of features and i'm adding them to new vector

Was it helpful?

Solution

Call transform on any Geometry, it should just work. Multi-point geometries inherit from OpenLayers.Geometry.Collection which has its own transform method.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top