Sat, 10/17/2015 - 04:39
#1
Can't get back "shape"
For some reason, mapquest won't give me the direction shape.
The response preview is:
- info: {copyright: {text: "© 2015 MapQuest, Inc.", imageUrl: "http://api.mqcdn.com/res/mqlogo.gif",…},…}
- route: {hasTollRoad: true, computedWaypoints: [], fuelUsed: 30.01, hasUnpaved: false, hasHighway: true,…}
- boundingBox: {ul: {lng: -100.534744, lat: 39.828163}, lr: {lng: -89.861976, lat: 38.30516}}
- computedWaypoints: []
- distance: 689.4151
- formattedTime: "10:39:30"
- fuelUsed: 30.01
- hasCountryCross: false
- hasFerry: false
- hasHighway: true
- hasSeasonalClosure: false
- hasTollRoad: true
- hasUnpaved: false
- legs: [{hasTollRoad: false, index: 0, roadGradeStrategy: [[]], hasHighway: true, hasUnpaved: false,…},…]
- locationSequence: [0, 1, 2, 3, 4]
- locations: [,…]
- options: {mustAvoidLinkIds: [], drivingStyle: 2, countryBoundaryDisplay: true, generalize: -1,…}
- realTime: -1
- routeError: {message: "", errorCode: -400}
- sessionId: "56223028-01a3-0007-02b7-4f6c-00163ec01eda"
- time: 38370
What am I doing wrong?
That worked great, except that dragging no longer works. You can drag the markers, but the route doesn't update and neither does the direction print.
I can't expose my local server at the moment, but here is a demo. http://jsfiddle.net/onp9gmay/12/