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

Tutorial - enhancements for languages and URL hash #159

@rmglennon

Description

@rmglennon

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions