How to develop roads in openlayer 3

277 Views Asked by At

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?

1

There are 1 best solutions below

0
Knarf On

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.