Skip to content
This repository has been archived by the owner on Mar 1, 2021. It is now read-only.

Tutorial - enhancements for languages and URL hash #159

Open
rmglennon opened this issue Apr 5, 2017 · 0 comments
Open

Tutorial - enhancements for languages and URL hash #159

rmglennon opened this issue Apr 5, 2017 · 0 comments
Assignees

Comments

@rmglennon
Copy link
Collaborator

Some feedback from @burritojustice for the tutorial (source file: https://github.com/valhalla/valhalla-docs/blob/master/add-routing-to-a-map.md)

  1. Show how to switch languages. Code from tutorial is something like this:
    L.Routing.control({
      waypoints: [
        L.latLng(41.8758,-87.6189),
        L.latLng(33.8128,-117.9259)
      ],
      lineOptions: {
        styles: [ {color: "white",opacity: 0.8, weight: 12},
                {color: "#2676C6", opacity: 1, weight: 6}
      ]},
      router: L.Routing.mapzen("your-api-key", {costing:"auto"}),
      formatter: new L.Routing.mapzenFormatter(),
      summaryTemplate:'<div class="start">{name}</div><div class="info {costing}">{distance}, {time}</div>',
      routeWhileDragging: false
    }).addTo(map);
  1. Add ability to use a URL hash to re-create the route. Mapzen.js has this capability. I think the hash will be easier to get after lrm-mapzen is integrated into mapzen.js.
@rmglennon rmglennon self-assigned this Apr 5, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant