Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: kdiluca/demos
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: valhalla/demos
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: gh-pages
Choose a head ref
Able to merge. These branches can be automatically merged.

Commits on May 27, 2015

  1. Copy the full SHA
    b685f53 View commit details
  2. Merge pull request valhalla#25 from valhalla/dwn

    Add some notes on service limits and some TBD items.
    dnesbitt61 committed May 27, 2015
    Copy the full SHA
    32542b2 View commit details
  3. Copy the full SHA
    853aa47 View commit details

Commits on May 28, 2015

  1. Some text updates

    rmglennon committed May 28, 2015
    Copy the full SHA
    b29911f View commit details
  2. Copy the full SHA
    9eaa7a8 View commit details
  3. Copy the full SHA
    d770f2d View commit details

Commits on May 29, 2015

  1. Copy the full SHA
    c3946c2 View commit details
  2. Fix typo.

    dnesbitt61 committed May 29, 2015
    Copy the full SHA
    53a3fc6 View commit details
  3. Copy the full SHA
    99ee2c0 View commit details
  4. Merge pull request valhalla#27 from valhalla/dwn

    Draft connectivity map blog.
    dnesbitt61 committed May 29, 2015
    Copy the full SHA
    5b7eb69 View commit details

Commits on May 30, 2015

  1. Add tables and make content updates

    Moved unordered lists into tables, cleaned up text, added links to OSM
    tags, ordered costing options, added bicycle options. To do: get
    started, fix heading hierarchy, output section
    rmglennon committed May 30, 2015
    Copy the full SHA
    1ba1867 View commit details

Commits on Jun 1, 2015

  1. take a swag at wording

    kevinkreiser committed Jun 1, 2015
    Copy the full SHA
    e464b05 View commit details
  2. list lint

    kevinkreiser committed Jun 1, 2015
    Copy the full SHA
    3583c31 View commit details
  3. wording update

    kevinkreiser committed Jun 1, 2015
    Copy the full SHA
    9bbbed6 View commit details
  4. add link

    kevinkreiser committed Jun 1, 2015
    Copy the full SHA
    619e730 View commit details
  5. typo

    kevinkreiser committed Jun 1, 2015
    Copy the full SHA
    2b8cb51 View commit details
  6. Merge pull request valhalla#28 from valhalla/kk_blog

    wording updates but also geojson
    kevinkreiser committed Jun 1, 2015
    Copy the full SHA
    006571a View commit details
  7. More updates,

    Removed section on rate limitations per second/day (following
    discussion check in meeting), formatting of JSON output section
    rmglennon committed Jun 1, 2015
    Copy the full SHA
    f97fa0f View commit details

Commits on Jun 2, 2015

  1. More cleanup and examples

    Added route return examples, removed compatibility mode, updated URLs,
    improved table cell alignment, added code formatting
    rmglennon committed Jun 2, 2015
    Copy the full SHA
    f68a6fe View commit details
  2. Change to out_format and sos

    indicating that pdf and sos are not yet supported.
    rmglennon committed Jun 2, 2015
    Copy the full SHA
    f411c3d View commit details
  3. Merge pull request valhalla#26 from valhalla/demo-doc-updates

    Some text updates to intro section
    rmglennon committed Jun 2, 2015
    Copy the full SHA
    23a1767 View commit details

Commits on Jun 3, 2015

  1. Update location input parameters

    Clarify that street name isn't currently implemented. Add OSM way_id as a location input and some text about it.
    rmglennon committed Jun 3, 2015
    Copy the full SHA
    2daa483 View commit details
  2. Merge pull request valhalla#29 from valhalla/rmglennon-patch-1

    Update location input parameters
    rmglennon committed Jun 3, 2015
    Copy the full SHA
    0163474 View commit details
  3. New page with repos and terms

    Copy of content from chef readme (to be edited later + diagram), add
    new section on terms (in progress)
    rmglennon committed Jun 3, 2015
    Copy the full SHA
    b714147 View commit details
  4. Merge pull request valhalla#30 from valhalla/doc-overviews

    New page with repos and terms
    rmglennon committed Jun 3, 2015
    Copy the full SHA
    b5a143a View commit details

Commits on Jun 15, 2015

  1. Copy the full SHA
    dfa1a58 View commit details
  2. Copy the full SHA
    ee0677e View commit details
  3. Copy the full SHA
    4777c8a View commit details

Commits on Jun 16, 2015

  1. Merge pull request valhalla#31 from valhalla/gh-pages

    merge in leaflet work
    kevinkreiser committed Jun 16, 2015
    Copy the full SHA
    d8b5787 View commit details

Commits on Jun 18, 2015

  1. Copy the full SHA
    e1fc0e8 View commit details
  2. Merge pull request valhalla#33 from valhalla/kikid

    updated for multipoint routing & to use a calendar picker
    kevinkreiser committed Jun 18, 2015
    Copy the full SHA
    bbb0314 View commit details
  3. Merge pull request valhalla#34 from valhalla/gh-pages

    merge gh-pages to master for kristens updates
    kevinkreiser committed Jun 18, 2015
    Copy the full SHA
    2cdc480 View commit details

Commits on Jun 26, 2015

  1. Copy the full SHA
    081ce42 View commit details

Commits on Jun 29, 2015

  1. Copy the full SHA
    8d4637d View commit details
  2. Merge pull request valhalla#38 from valhalla/kikid

    added environment switching dropdown and removed draggable markers on…
    kdiluca committed Jun 29, 2015
    Copy the full SHA
    920b7ef View commit details
  3. Copy the full SHA
    c04d0f2 View commit details
  4. FIx some typos.

    dnesbitt61 committed Jun 29, 2015
    Copy the full SHA
    093a4b1 View commit details
  5. typo

    kevinkreiser committed Jun 29, 2015
    Copy the full SHA
    fe6c617 View commit details
  6. Copy the full SHA
    c61b96f View commit details
  7. less confusing wording

    kevinkreiser committed Jun 29, 2015
    Copy the full SHA
    ca8c974 View commit details
  8. link

    kevinkreiser committed Jun 29, 2015
    Copy the full SHA
    801545a View commit details

Commits on Jun 30, 2015

  1. Merge pull request valhalla#40 from valhalla/dwn

    Draft blog for dynamic costing.
    dnesbitt61 committed Jun 30, 2015
    Copy the full SHA
    5b06926 View commit details

Commits on Jul 1, 2015

  1. Fix link from issue valhalla#41

    Changed link to https://github.com/valhalla/conf/blob/master/valhalla.json (couldn't get relative links to work across repos)
    rmglennon committed Jul 1, 2015
    Copy the full SHA
    e7f3b52 View commit details
  2. Merge pull request valhalla#42 from valhalla/fix-link

    Fix link from issue valhalla#41
    rmglennon committed Jul 1, 2015
    Copy the full SHA
    1872361 View commit details

Commits on Jul 2, 2015

  1. fix to only run the latest request when route mode of travel buttons …

    …are clicked, not the entire route history
    kdiluca committed Jul 2, 2015
    Copy the full SHA
    10a379e View commit details

Commits on Jul 6, 2015

  1. Merge pull request valhalla#43 from valhalla/kikid

    fix to only run the latest request when route mode of travel buttons …
    kdiluca committed Jul 6, 2015
    Copy the full SHA
    2d47ea4 View commit details
  2. Copy the full SHA
    54d2ff4 View commit details
  3. Copy the full SHA
    0ef642b View commit details
  4. Merge pull request valhalla#44 from valhalla/kikid

    added alert with statuscode and message for route failure
    kdiluca committed Jul 6, 2015
    Copy the full SHA
    842168c View commit details
  5. Copy the full SHA
    b6b37fd View commit details
Showing with 68,139 additions and 10,543 deletions.
  1. +4 −0 .gitignore
  2. 0 .gitmodules
  3. +2 −1 LICENSE.md
  4. +235 −0 centroid/index.html
  5. +0 −46 docs/blogs/2015-03-20-valhalla-intro.md
  6. +0 −61 docs/blogs/2015-04-15-why_tiles.md
  7. BIN docs/blogs/images/why_tiles.gif
  8. +2 −30 docs/index.md
  9. +0 −151 docs/valhalla_service.md
  10. +6 −0 elevation/conf/environment.conf
  11. +102 −0 elevation/css/elevation.css
  12. +39 −0 elevation/css/mapzen-common.css
  13. +72 −0 elevation/index.html
  14. +345 −0 elevation/js/L.Elevation.Widget.js
  15. +232 −0 elevation/js/elevation.js
  16. +106 −0 expansion/index.html
  17. +1,498 −0 flot/API.md
  18. +98 −0 flot/CONTRIBUTING.md
  19. +75 −0 flot/FAQ.md
  20. +22 −0 flot/LICENSE.txt
  21. +12 −0 flot/Makefile
  22. +1,026 −0 flot/NEWS.md
  23. +143 −0 flot/PLUGINS.md
  24. +110 −0 flot/README.md
  25. BIN flot/examples/.DS_Store
  26. +4 −0 flot/examples/ajax/data-eu-gdp-growth-1.json
  27. +4 −0 flot/examples/ajax/data-eu-gdp-growth-2.json
  28. +4 −0 flot/examples/ajax/data-eu-gdp-growth-3.json
  29. +4 −0 flot/examples/ajax/data-eu-gdp-growth-4.json
  30. +4 −0 flot/examples/ajax/data-eu-gdp-growth-5.json
  31. +4 −0 flot/examples/ajax/data-eu-gdp-growth.json
  32. +4 −0 flot/examples/ajax/data-japan-gdp-growth.json
  33. +4 −0 flot/examples/ajax/data-usa-gdp-growth.json
  34. +173 −0 flot/examples/ajax/index.html
  35. +87 −0 flot/examples/annotating/index.html
  36. +97 −0 flot/examples/axes-interacting/index.html
  37. +77 −0 flot/examples/axes-multiple/index.html
  38. +893 −0 flot/examples/axes-time-zones/date.js
  39. +114 −0 flot/examples/axes-time-zones/index.html
  40. +1,181 −0 flot/examples/axes-time-zones/tz/africa
  41. +413 −0 flot/examples/axes-time-zones/tz/antarctica
  42. +2,717 −0 flot/examples/axes-time-zones/tz/asia
  43. +1,719 −0 flot/examples/axes-time-zones/tz/australasia
  44. +117 −0 flot/examples/axes-time-zones/tz/backward
  45. +81 −0 flot/examples/axes-time-zones/tz/etcetera
  46. +2,856 −0 flot/examples/axes-time-zones/tz/europe
  47. +10 −0 flot/examples/axes-time-zones/tz/factory
  48. +276 −0 flot/examples/axes-time-zones/tz/iso3166.tab
  49. +100 −0 flot/examples/axes-time-zones/tz/leapseconds
  50. +3,235 −0 flot/examples/axes-time-zones/tz/northamerica
  51. +28 −0 flot/examples/axes-time-zones/tz/pacificnew
  52. +390 −0 flot/examples/axes-time-zones/tz/solar87
  53. +390 −0 flot/examples/axes-time-zones/tz/solar88
  54. +395 −0 flot/examples/axes-time-zones/tz/solar89
  55. +1,711 −0 flot/examples/axes-time-zones/tz/southamerica
  56. +38 −0 flot/examples/axes-time-zones/tz/systemv
  57. +38 −0 flot/examples/axes-time-zones/tz/yearistype.sh
  58. +441 −0 flot/examples/axes-time-zones/tz/zone.tab
  59. +137 −0 flot/examples/axes-time/index.html
  60. BIN flot/examples/background.png
  61. +91 −0 flot/examples/basic-options/index.html
  62. +57 −0 flot/examples/basic-usage/index.html
  63. +75 −0 flot/examples/canvas/index.html
  64. +64 −0 flot/examples/categories/index.html
  65. +97 −0 flot/examples/examples.css
  66. BIN flot/examples/image/hs-2004-27-a-large-web.jpg
  67. +69 −0 flot/examples/image/index.html
  68. +80 −0 flot/examples/index.html
  69. +118 −0 flot/examples/interacting/index.html
  70. BIN flot/examples/navigate/arrow-down.gif
  71. BIN flot/examples/navigate/arrow-left.gif
  72. BIN flot/examples/navigate/arrow-right.gif
  73. BIN flot/examples/navigate/arrow-up.gif
  74. +153 −0 flot/examples/navigate/index.html
  75. +79 −0 flot/examples/percentiles/index.html
  76. +122 −0 flot/examples/realtime/index.html
  77. +76 −0 flot/examples/resize/index.html
  78. +152 −0 flot/examples/selection/index.html
  79. +150 −0 flot/examples/series-errorbars/index.html
  80. +818 −0 flot/examples/series-pie/index.html
  81. +121 −0 flot/examples/series-toggle/index.html
  82. +90 −0 flot/examples/series-types/index.html
  83. +6 −0 flot/examples/shared/jquery-ui/jquery-ui.min.css
  84. +6 −0 flot/examples/shared/jquery-ui/jquery-ui.min.js
  85. +107 −0 flot/examples/stacking/index.html
  86. +76 −0 flot/examples/symbols/index.html
  87. +76 −0 flot/examples/threshold/index.html
  88. +135 −0 flot/examples/tracking/index.html
  89. +147 −0 flot/examples/visitors/index.html
  90. +144 −0 flot/examples/zooming/index.html
  91. +1,428 −0 flot/excanvas.js
  92. +1 −0 flot/excanvas.min.js
  93. +180 −0 flot/jquery.colorhelpers.js
  94. +1 −0 flot/jquery.colorhelpers.min.js
  95. +411 −0 flot/jquery.flot.axislabels.js
  96. +345 −0 flot/jquery.flot.canvas.js
  97. +7 −0 flot/jquery.flot.canvas.min.js
  98. +190 −0 flot/jquery.flot.categories.js
  99. +7 −0 flot/jquery.flot.categories.min.js
  100. +176 −0 flot/jquery.flot.crosshair.js
  101. +7 −0 flot/jquery.flot.crosshair.min.js
  102. +353 −0 flot/jquery.flot.errorbars.js
  103. +7 −0 flot/jquery.flot.errorbars.min.js
  104. +226 −0 flot/jquery.flot.fillbetween.js
  105. +7 −0 flot/jquery.flot.fillbetween.min.js
  106. +241 −0 flot/jquery.flot.image.js
  107. +7 −0 flot/jquery.flot.image.min.js
  108. +3,168 −0 flot/jquery.flot.js
  109. +8 −0 flot/jquery.flot.min.js
  110. +346 −0 flot/jquery.flot.navigate.js
  111. +7 −0 flot/jquery.flot.navigate.min.js
  112. +820 −0 flot/jquery.flot.pie.js
  113. +7 −0 flot/jquery.flot.pie.min.js
  114. +59 −0 flot/jquery.flot.resize.js
  115. +7 −0 flot/jquery.flot.resize.min.js
  116. +360 −0 flot/jquery.flot.selection.js
  117. +7 −0 flot/jquery.flot.selection.min.js
  118. +188 −0 flot/jquery.flot.stack.js
  119. +7 −0 flot/jquery.flot.stack.min.js
  120. +71 −0 flot/jquery.flot.symbol.js
  121. +7 −0 flot/jquery.flot.symbol.min.js
  122. +142 −0 flot/jquery.flot.threshold.js
  123. +7 −0 flot/jquery.flot.threshold.min.js
  124. +432 −0 flot/jquery.flot.time.js
  125. +7 −0 flot/jquery.flot.time.min.js
  126. +9,472 −0 flot/jquery.js
  127. +5 −0 flot/jquery.min.js
  128. +74 −0 isochrone/index.html
  129. +134 −0 isochrone/main.js
  130. +41 −0 isochrone/styles.css
  131. +252 −0 locate/index.html
  132. +73 −0 locate/style.css
  133. +10 −0 map_matching/conf/env.conf
  134. +4 −0 map_matching/css/classic.css
  135. +56 −0 map_matching/css/leaflet.label.css
  136. +35 −0 map_matching/css/mapzen-common.css
  137. +287 −0 map_matching/css/optimized_route.css
  138. +113 −0 map_matching/index-internal.html
  139. +107 −0 map_matching/index.html
  140. +20 −0 map_matching/js/LICENSE.txt
  141. +20 −0 map_matching/js/MIT-LICENCE.txt
  142. +9 −0 map_matching/js/jquery.columns.min.js
  143. +354 −0 map_matching/js/main.js
  144. +267 −0 map_matching/js/map_matching.js
  145. +4 −0 matrix/css/classic.css
  146. +56 −0 matrix/css/leaflet.label.css
  147. +35 −0 matrix/css/mapzen-common.css
  148. +269 −0 matrix/css/matrix.css
  149. BIN matrix/images/arrow-left.png
  150. BIN matrix/images/arrow-right.png
  151. BIN matrix/images/bg_hr.png
  152. BIN matrix/images/blacktocat.png
  153. BIN matrix/images/icon_download.png
  154. +60 −0 matrix/images/modes.icons.svg
  155. +49 −0 matrix/images/modes.svg
  156. +21 −0 matrix/images/multimodal.svg
  157. BIN matrix/images/search.png
  158. BIN matrix/images/sprite_download.png
  159. +153 −0 matrix/images/timedistancelogo.svg
  160. +146 −0 matrix/index-internal.html
  161. +120 −0 matrix/index.html
  162. +20 −0 matrix/js/LICENSE.txt
  163. +20 −0 matrix/js/MIT-LICENCE.txt
  164. +9 −0 matrix/js/jquery.columns.min.js
  165. +9 −0 matrix/js/leaflet.label.js
  166. +126 −0 matrix/js/matrix.js
  167. BIN matrix/resource/matrix_pin_end.png
  168. BIN matrix/resource/matrix_pin_start.png
  169. +20 −0 optimized_route/conf/env.conf
  170. +4 −0 optimized_route/css/classic.css
  171. +56 −0 optimized_route/css/leaflet.label.css
  172. +35 −0 optimized_route/css/mapzen-common.css
  173. +287 −0 optimized_route/css/optimized_route.css
  174. +149 −0 optimized_route/index-internal.html
  175. +150 −0 optimized_route/index.html
  176. +20 −0 optimized_route/js/LICENSE.txt
  177. +20 −0 optimized_route/js/MIT-LICENCE.txt
  178. +9 −0 optimized_route/js/jquery.columns.min.js
  179. +229 −0 optimized_route/js/locate/L.Locate.js
  180. +549 −0 optimized_route/js/optimized_route.js
  181. +25 −0 points/index.html
  182. +11 −0 points/points.css
  183. +65 −0 points/points.js
  184. +31 −0 polyline/decode.js
  185. +118 −0 polyline/index.html
  186. +5 −3 routing/README.md
  187. +12 −0 routing/conf/environment.conf
  188. +0 −72 routing/css/demo.css
  189. +89 −0 routing/css/elevation.css
  190. +305 −0 routing/css/leaflet-routing-machine.css
  191. +0 −124 routing/css/leaflet.awesome-markers.css
  192. +0 −478 routing/css/leaflet.css
  193. +0 −44 routing/css/leaflet.ie.css
  194. +0 −26 routing/css/leaflet.locate.css
  195. +0 −20 routing/css/leaflet.locations.css
  196. +142 −0 routing/css/valhalla.css
  197. +2,705 −0 routing/dist/leaflet-routing-machine.js
  198. +4 −0 routing/dist/leaflet-routing-machine.min.js
  199. +3,106 −0 routing/dist/lrm-mapzen-optimized-route-patched.js
  200. +3,014 −0 routing/dist/lrm-mapzen-patched.js
  201. +2 −0 routing/dist/lrm-mapzen.min.js
  202. BIN routing/images/Valhalla.png
  203. BIN routing/{js → }/images/bike-01.png
  204. BIN routing/{js → }/images/bike.png
  205. BIN routing/images/cancel.png
  206. BIN routing/images/drive.png
  207. BIN routing/{js → }/images/ic_car_start_pressed.png
  208. BIN routing/{js → }/images/ic_pin-icon.png
  209. BIN routing/{js → }/images/ic_pin.png
  210. BIN routing/{js → }/images/ic_pin_active.png
  211. BIN routing/{js → }/images/ic_pin_active_end.png
  212. BIN routing/{js → }/images/ic_pin_active_start.png
  213. BIN routing/{js → }/images/ic_walk_start_normal.png
  214. BIN routing/{js → }/images/ic_walk_start_pressed.png
  215. +1 −0 routing/images/icons.svg
  216. BIN routing/{css → }/images/layers-2x.png
  217. BIN routing/{css → }/images/layers.png
  218. BIN routing/images/list.png
  219. BIN routing/{css → }/images/marker-icon-2x.png
  220. BIN routing/{css → }/images/marker-icon.png
  221. BIN routing/{css → }/images/marker-icon@2x.png
  222. BIN routing/{css → }/images/marker-shadow.png
  223. BIN routing/{css → }/images/markers-matte.png
  224. BIN routing/{css → }/images/markers-matte@2x.png
  225. BIN routing/{css → }/images/markers-plain.png
  226. BIN routing/{css → }/images/markers-shadow.png
  227. BIN routing/{css → }/images/markers-shadow@2x.png
  228. BIN routing/{css → }/images/markers-soft.png
  229. BIN routing/{css → }/images/markers-soft@2x.png
  230. BIN routing/images/route.png
  231. BIN routing/images/turnbyturnlogo.png
  232. BIN routing/images/walk.png
  233. +250 −0 routing/index-internal.html
  234. +227 −45 routing/index.html
  235. +0 −365 routing/js/L.Control.Locate.js
  236. +0 −91 routing/js/L.Control.Modes.js
  237. +483 −0 routing/js/calendar/datetimepicker.js
  238. +0 −196 routing/js/demo.js
  239. +290 −0 routing/js/elevation/L.Elevation.js
  240. BIN routing/js/images/layers-2x.png
  241. BIN routing/js/images/layers.png
  242. BIN routing/js/images/marker-icon-2x.png
  243. BIN routing/js/images/marker-icon.png
  244. BIN routing/js/images/marker-icon@2x.png
  245. BIN routing/js/images/marker-shadow.png
  246. +218 −216 routing/js/leaflet-hash.js
  247. +0 −125 routing/js/leaflet.awesome-markers.js
  248. +0 −8,339 routing/js/leaflet.js
  249. +0 −109 routing/js/leaflet_rm/L.Routing.Line.js
  250. +229 −0 routing/js/locate/L.Locate.js
  251. +7 −0 routing/js/{leaflet_rm → lrm}/L.Routing.Control.js
  252. 0 routing/js/{leaflet_rm → lrm}/L.Routing.Itinerary.js
  253. +151 −0 routing/js/lrm/L.Routing.Line.js
  254. +173 −0 routing/js/lrm/L.Routing.Mapzen.Formatter.js
  255. +371 −0 routing/js/lrm/L.Routing.Mapzen.js
  256. 0 routing/js/{leaflet_rm → lrm}/L.Routing.OSRM.js
  257. +5 −1 routing/js/{leaflet_rm → lrm}/L.Routing.Plan.js
  258. +1,290 −0 routing/js/valhalla.js
  259. +139 −0 routing/languages.html
  260. +5 −0 routing/map_style/refill-style.yaml
  261. +4 −0 routing/map_style/zinc-basemap.yaml
  262. +5,992 −0 routing/map_style/zinc-style-more-labels.yaml
  263. +164 −0 routing/multimodal.html
  264. BIN routing/resource/bike.png
  265. BIN routing/resource/blue_dot.png
  266. BIN routing/resource/cal.gif
  267. BIN routing/resource/cancel.png
  268. BIN routing/resource/dest_red_dot.png
  269. BIN routing/resource/destmarker.png
  270. BIN routing/resource/destmarker@2x.png
  271. BIN routing/resource/dot.png
  272. BIN routing/resource/drive.png
  273. BIN routing/resource/hide.png
  274. BIN routing/resource/list.png
  275. +67 −0 routing/resource/scene.yaml
  276. BIN routing/resource/show.png
  277. BIN routing/resource/start_green_dot.gif
  278. BIN routing/resource/startmarker@2x.png
  279. BIN routing/resource/via_dot.png
  280. BIN routing/resource/walk.png
  281. +253 −0 routing/simple.html
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.project
.settings
.DS_Store
.DS_Store?
Empty file added .gitmodules
Empty file.
3 changes: 2 additions & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
The MIT License (MIT)

Copyright (c) 2015 Mapzen
Copyright (c) 2018 Valhalla contributors
Copyright (c) 2015-2017 Mapillary AB, Mapzen

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
235 changes: 235 additions & 0 deletions centroid/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,235 @@
<!DOCTYPE html>
<html>
<head>
<title>Centroid</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.5.1/dist/leaflet.css"
integrity="sha512-xwE/Az9zrjBIphAcBb3F6JVqxf46+CDLwfLMHloNu6KEQCAWi6HcDUbeOfBIptF7tcCzusKFjFw2yuvEpDL9wQ=="
crossorigin=""/>
</head>
<body>
<script src="https://unpkg.com/leaflet@1.5.1/dist/leaflet.js"
integrity="sha512-GffPMF3RvMeYyc1LWMHtK8EbPv0iNZ8/oTtHPx9/cc2ILxQ+u905qIwdpULaqDkyBKgOaB57QTMg7ztg8Jm2Og=="
crossorigin=""></script>
<script src="https://code.jquery.com/jquery-2.2.4.min.js" integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous"></script>
<script src="../polyline/decode.js"></script>

<div style="width:100%">

<div id="map" style="height: 1050px"></div>

Tile Layer: <select id="tileurl">
<option id=osm selected="selected" value='http://b.tile.openstreetmap.org/{z}/{x}/{y}.png'>OSM</option>
<option id=mapbox value='https://api.mapbox.com/v4/mapbox.streets/{z}/{x}/{y}@2x.png'>Mapbox</option>
</select></br>
Map Token: <input id="maptoken" placeholder="Enter token."></input></br>

Base URL: <input id="baseurl" placeholder="http://localhost:8002/"></input></br>

<!-- <select id="baseurl">
<option id=localhost selected="selected" value="http://localhost:8002/">localhost</option>
<option id=staging value="https://api-valhalla-route-staging.tilestream.net/valhalla/v1/">staging</option>
<option id=production value="https://valhalla1.openstreetmap.de/">production</option>
</select></br>
-->
Valhalla Token: <input id="token" rows="1" cols="30" maxlength="100" wrap="hard" placeholder="Enter token."></input></br>
Radius: <input id="radius" type="range" min="0" max="1000" value="0" step="1" onchange="document.getElementById('radius_text').value=this.value;" />
<input type="text" id="radius_text" value="0" maxlength="4" size="4" /></br>
Reachibility: <input id="reach" type="range" min="0" max="1000" value="100" step="1" onchange="document.getElementById('reach_text').value=this.value;" />
<input type="text" id="reach_text" value="0" maxlength="4" size="4" /></br>
Heading: <input id="heading" type="range" min="-1" max="359" value="-1" step="1" onchange="document.getElementById('heading_text').value=this.value;" />
<input type="text" id="heading_text" value="-1" maxlength="4" size="4" /></br>
Node Tolerance: <input id="node" type="range" min="0" max="1000" value="5" step="1" onchange="document.getElementById('node_text').value=this.value;" />
<input type="text" id="node_text" value="0" maxlength="4" size="4" /></br>
Costing: <select id="costing">
<option selected>auto</option>
<option>pedestrian</option>
<option>bicycle</option>
</select></br>
Preferred Side: <select id="pref">
<option selected>either</option>
<option>same</option>
<option>opposite</option>
</select></br>
<button type="button" id="route">Find Centroid</button>

</div>

<script>
//make a map using osm tiles
var map = L.map('map').setView([40.2, -76.6], 10);
var baseLayer = L.tileLayer('http://b.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 19,
attribution: '&copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributers'
})
baseLayer.addTo(map);

//the button
var routeButton = document.getElementById('route');

//state
var geojson = null;
var locations = [];
var inputs = [];

//build a location object for the request
map.on('click', function (event) {
//clear this if its not null
if(geojson != null)
geojson.removeFrom(map);

//make the location
var loc = {
lat: event.latlng.lat,
lon: event.latlng.lng,
minimum_reachability: parseInt(document.getElementById('reach').value),
radius: parseInt(document.getElementById('radius').value),
heading: parseInt(document.getElementById('heading').value),
node_snap_tolerance: parseInt(document.getElementById('node').value),
preferred_side: document.getElementById('pref').value
};
locations.push(loc);

//mark where they clicked
input = new L.CircleMarker(event.latlng, { color: '#0000bb', radius: 5, fillOpacity: 0.75 });
input.addTo(map);
inputs.push(input);
});

//build the url from all the locations
function build_url() {
var json = {
locations: locations/*,
costing_options: {
auto: {
use_highways: 0.35
}
}*/
};
//remove negative heading
if(json.locations[0].heading < 0)
delete json.locations[0].heading;
//selectable base url
var baseurl = document.getElementById('baseurl').value;
if (!baseurl)
baseurl = 'http://localhost:8002/';
//access token
var token = document.getElementById('token').value;
//optional costing
var costing = document.getElementById('costing').value;
json['costing'] = costing;
//give back the string
var url = baseurl + 'centroid?json=' + escape(JSON.stringify(json));
if (token)
url += '&access_token=' + token;
return url;
}

//convert the result into geojson so its displayable
function build_geojson(result) {
var fc = { type:'FeatureCollection', features: [] };

// get the route geometry as linestirngs
let obj = {
trip: result.trip
}
result.alternates.push(obj);
result.alternates.forEach(function (alternate) {
// the route
var route_feature = {
type: 'Feature',
properties: {
color: '#' + ('000000' + Math.floor(Math.random()*16777215*.5).toString(16)).substr(-6),
opacity: 0.75,
weight: 5
},
geometry:{
type: 'LineString',
coordinates: decode(alternate.trip.legs[0].shape, 1e6)
}
};

console.log(route_feature.properties.color);

// the destination
var destination_feature = {
type: 'Feature',
properties: {
color: '#bb0000',
radius: 5,
fillOpacity: 0.75
},
geometry:{
type: 'Point',
coordinates: route_feature.geometry.coordinates.slice(-1)[0]
}
};

fc.features.push(route_feature);
fc.features.push(destination_feature);
});

// show all the origins
locations.forEach(function (loc){
var origin_feature = {
type: 'Feature',
properties: {
color: '#00bb00',
radius: 5,
fillOpacity: 0.75
},
geometry:{
type: 'Point',
coordinates: [loc.lon, loc.lat]
}
}

fc.features.push(origin_feature);
});

//give back the feature collection
return fc;
}

//button press callback to fire off the request to the server
routeButton.onclick = function onRoute(event) {
//update the map with the results
var url = build_url();
//grab the url
$.getJSON(url, function(result) {
//turn the result into geojson
fc = build_geojson(result)
//make a leaflet geojson object
geojson = L.geoJson(fc, {
style: function(feature) { return feature.properties; },
pointToLayer: function(feature, ll) { return new L.CircleMarker(ll, feature.properties); }
});
//disappear the input
inputs.forEach(function (input) {
input.removeFrom(map);
});
inputs = [];
locations = [];
//render the geojson
var added = geojson.addTo(map);
//fit it in view
map.fitBounds(added.getBounds(), { maxZoom: 19 });
});
};

function onTileLayerChange() {
var tileurl = document.getElementById('tileurl').value;
var token = document.getElementById('maptoken').value;
if (tileurl.includes('mapbox') && token) {
tileurl += '?access_token=' + token;
}
baseLayer.setUrl(tileurl);
}

//hook up the callback for the tile url changing
document.getElementById('tileurl').addEventListener('change', onTileLayerChange);
document.getElementById('maptoken').addEventListener('change', onTileLayerChange);
</script>
</body>
</html>
46 changes: 0 additions & 46 deletions docs/blogs/2015-03-20-valhalla-intro.md

This file was deleted.

Loading