I have a vector layer which is county boundaries for all counties in the US. When I add this layer to the map, the map becomes very slow when zooming in and moving around on the map when I am zoomed out to a certain extent, but performs Okay when I am zoomed in. I believe this is because of how much detail that is being drawn with all the county lines when zoomed out. Does anyone know of a way to force openlayers to draw a less detailed version of the vector layer when I am zoomed out to a certain extent? Also any other ideas to improve performance with detailed vector layers like this would be appreciated. Thank you!
0
votes
Did you try simplify your boundaries with github.com/mbostock/topojson?
- Jonatas Walker
How do you load your Vectors? I had the same problem with vectors I loaded from an PostGIS DB. I fixed it by refreshing the vectors on each zoom and using ST_SIMPLIFY to simplify the vecotrs for the different zoom levels.
- Dennis van Schaik
1 Answers
2
votes
You could try using an image layer with an image-vector source.
Here's an example:
http://openlayers.org/en/v3.8.2/examples/image-vector-layer.html