I’m using OpenLayers to render a OpenLayers.Geometry.LineString on a OpenLayers.Layer.Vector layer. The idea is that the line, sometimes, can contain a big amount of points, which will make the web browser stall. I can’t touch the server code because we retrieve the data from external website.
Is there an elegant way that I can make the line to have less points when you see it in full size, and more points as you zoom to it (increase the line’s resolution as you zoom on it)?
The only solutions that I have right now is either to inform the user that the line is humongous and ask him if he has the courage to render it, or to build the line with less points from the start, and risk to have some issues when the user will zoom on the line.
The complete solution can be found here.