0

I have to develop a functionality in ol3 which is capable to draw a lot of custom roads(tracks) on the same map. I want a quick access to those roads because I need to update them in real-time. To achieve that, I want to store each road organized and independent from each other. From my research I've noticed that a solution is to store a road as a list of segments(each segment is a ol.Feature) which are stored in a layer(ol.layer.Vector). So the main idea is to represent each road in separate layer

Any ideas if increasing number of layers inside a ol3 map will have a performance impact? Or how I can rethink my idea to keep all roads organized and separated from each other?

CroMagnon
  • 1,218
  • 7
  • 20
  • 32
N. Silviu
  • 113
  • 1
  • 8
  • 1
    One road per layer is not a good idea. Wouldn't just clicking the road give you quick access? You can selectively hide/show features. – Corey Alix Feb 06 '17 at 14:50

1 Answers1

2

Creating a seperate layer for each road doesn't sound like a good idea to me. Maybe it works no problem.

Another thing you can do is to use attributes, and give each feature of the same road has the same attribute.

Knarf
  • 2,077
  • 1
  • 16
  • 24