Giter Site home page Giter Site logo

Comments (4)

rossanag avatar rossanag commented on August 27, 2024 1

Thanks so much!, it was a typo, my bad. It works perfectly now.

from lrm-mapzen.

hanbyul-here avatar hanbyul-here commented on August 27, 2024

Hey! I was able to see returned route array with the code below. (which is similar to yours)

var sampleLatLngs = [L.Routing.waypoint(L.latLng(37.752, -122.418)), L.Routing.waypoint(L.latLng(37.779, -122.391))];

var router = L.Routing.mapzen('your-api-key', {costing: 'auto'});

var sampleFunction = function(err, routes) {
  console.log(routes);
}

var route = router.route(sampleLatLngs, sampleFunction);

I wonder it is actually the points that our routing engine can't find the route between.
You can't even see returned error?

from lrm-mapzen.

rossanag avatar rossanag commented on August 27, 2024

I posted the error message above:
controlrouting.js:246 Uncaught TypeError: Cannot read property 'route' of null.

The only difference is I don't pass the lat lng, since I don't know it in 'advance', I get this information according the actual position and the nearest spot to the actual position.

from lrm-mapzen.

hanbyul-here avatar hanbyul-here commented on August 27, 2024

I just noticed that you are using colon (:) instead of equal sign(=) to assign router when L.Routing.mapzen is used . Do you have any reason doing this?

from lrm-mapzen.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.