Advertisement
Guest User

Untitled

a guest
Jan 24th, 2017
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.11 KB | None | 0 0
  1. var data = {
  2.  
  3. "type": "FeatureCollection",
  4. "features": [
  5. {
  6. "type": "Feature",
  7. "properties": {},
  8. "geometry": {
  9. "type": "LineString",
  10. "coordinates": [
  11. [
  12. 13.974609375,
  13. 31.728167146023935
  14. ],
  15. [
  16. 12.83203125,
  17. 34.74161249883172
  18. ],
  19. [
  20. 14.501953124999998,
  21. 35.31736632923788
  22. ],
  23. [
  24. 16.5234375,
  25. 37.16031654673677
  26. ],
  27. [
  28. 17.841796875,
  29. 38.41055825094609
  30. ],
  31. [
  32. 16.611328125,
  33. 40.245991504199026
  34. ],
  35. [
  36. 19.072265625,
  37. 43.389081939117496
  38. ]
  39. ]
  40. }
  41. },
  42. {
  43. "type": "Feature",
  44. "properties": {},
  45. "geometry": {
  46. "type": "LineString",
  47. "coordinates": [
  48. [
  49. 19.51171875,
  50. 30.90222470517144
  51. ],
  52. [
  53. 19.072265625,
  54. 33.65120829920497
  55. ],
  56. [
  57. 20.830078125,
  58. 35.24561909420681
  59. ],
  60. [
  61. 21.26953125,
  62. 38.47939467327645
  63. ]
  64. ]
  65. }
  66. },
  67. {
  68. "type": "Feature",
  69. "properties": {},
  70. "geometry": {
  71. "type": "LineString",
  72. "coordinates": [
  73. [
  74. 24.521484375,
  75. 32.10118973232094
  76. ],
  77. [
  78. 26.54296875,
  79. 35.96022296929667
  80. ],
  81. [
  82. 25.13671875,
  83. 36.80928470205937
  84. ],
  85. [
  86. 23.466796875,
  87. 38.13455657705411
  88. ],
  89. [
  90. 24.960937499999996,
  91. 41.31082388091818
  92. ]
  93. ]
  94. }
  95. }
  96. ]
  97. };
  98.  
  99. var polylines = L.geoJson(polylines, {
  100. onEachFeature: function (feature, layer) {
  101. L.polylineDecorator(layer, {
  102. patterns: [
  103. {offset: 25, repeat: 30, symbol: L.Symbol.arrowHead({pixelSize: 15, pathOptions: {fillOpacity: 1, weight: 0}})}
  104. ]
  105. })
  106. }
  107. }).addTo(map);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement