0

Hi i have some problem for offset the coordinates of multiple line

For example my records is like this

Record Number Name Start Point End Point Purpose
Record 1 Line1 PointA PointB Bus
Record 2 Line2 PointA PointB Taxi
Record 3 Line3 PointA PointB Walk
Record 4 Line4 PointA PointB Cycle
Record 5 Line5 PointB PointC Bus
Record 6 Line6 PointB PointD Bus
Record 7 Line7 PointB PointD Walk

i wish to write on openlayer map that will display

  • 4 lines from pointa to pointb using different color (bus=red,taxi=blue,walk=yellow,cycle=pink)
  • 1 line from point b to point c
  • 2 line from point b to point d

i try use this OpenLayers 3: Offset stroke style for example but i does not quite fit into it as for 4 lines from pointa to pointb will have different width size on map i not sure why.

i saw one example from leaflet is somehow like what i want but i want it to display in openlayer

ngjiajun
  • 16
  • 5
  • This is the result of the basic method https://jsfiddle.net/n61oaxyf/ with equal spacing. Are you trying to include the thin white spacer lines and black casing as in the leaflet example? – Mike Aug 25 '21 at 12:56
  • @Mike can i check how to display the name for each line? i mean total there are 7 lines [Line1,Line2,Line3,Line4,Line5,Line6,Line7] – ngjiajun Aug 26 '21 at 09:16

0 Answers0