Given a certain amount of features that sometimes don't fit all together inside the current window, is it better to use one single/few big layer/s or it it better to split the features among more smaller ones?

For example right now I'm rendering everything using three layers, one for all the icons, one for all the lines and one for the background. But relatively often zooming in and zooming out causes the background to lag. enter image description here enter image description here

Should I split the features in multiple small layers instead?

  • 2
    so, you have identified a bottleneck with the basemap and you are wondering if modifying the other layers would help. No, it won't. – JGH Jul 27 at 12:39
  • 1
    Dendritic features have poor render characteristics. You don't need more layers so much as more features -- Intersect them with a regular grid over the mapping area, so that the spatial index can ignore features which don't intersect the current canvas. You'll still have basemap issues, though. – Vince Jul 27 at 12:51
  • 1
    OpenLayers 2 is very old - you'd be best starting with a modern version like 6 and a faster basemap server. – Ian Turton Jul 27 at 14:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.