Comments (4)
Thanks so much!, it was a typo, my bad. It works perfectly now.
from lrm-mapzen.
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.
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.
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)
- Example of bicycle routing with different types of bikes
- Sub-Route (transfer) bug HOT 1
- getting ready for leaflet 1.0 HOT 2
- add location hash for gh-pages example
- Error in Routing Calculations HOT 4
- Problem with pedestrian mode HOT 4
- Tune by Turn & Search for the destination HOT 3
- L.Routing.mapzenFormatter and options HOT 1
- Can't set the language to spanish HOT 8
- No 'Access-Control-Allow-Origin' to valhalla.mapzen.com HOT 7
- Consider how to handle routing with multiple break points where some are along the way HOT 2
- Returning turn-by-turn data from a route. HOT 4
- Making the turn by turn example work with requirejs (r.js) HOT 2
- add a buffer to fitSelectedRoutes so pins don't get cut off HOT 1
- change too general class name HOT 1
- not passing some options HOT 1
- make default pins for the start and end of a route different colors
- fitBounds doesn't work with mapzenLine
- Add possibility to use your own Valhalla Server
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lrm-mapzen.