Giter Site home page Giter Site logo

Comments (1)

jgravois avatar jgravois commented on June 3, 2024

in this plugin i am parsing the service results manually and massaging them so that they look like what leaflet routing machine is expecting. you'd have to do something similar for a VRP response, keeping in mind that it has a different signature.

lrm-esri/src/esriRouter.js

Lines 225 to 263 in 5f82e3d

_esriManeuverToInstructionType: function(attributes, lastLeg) {
// case 'esriDMTStraight':
// case 'esriDMTTurnLeft':
// case 'esriDMTTurnRight':
switch (attributes.maneuverType) {
case 'esriDMTDepart':
return 'Head';
case 'esriDMTStop':
return lastLeg ? 'DestinationReached' : 'WaypointReached';
case 'esriDMTRoundabout':
case 'rotary':
return 'Roundabout';
case 'esriDMTForkLeft':
case 'esriDMTForkRight':
case 'esriDMTRampLeft':
case 'esriDMTRampRight':
case 'esriDMTSharpLeft':
case 'esriDMTSharpRight':
return this._camelCase(attributes.maneuverType);
default:
return null
}
},
_esriManeuverToModifier: function(attributes) {
var modifier;
switch (attributes.maneuverType) {
case 'esriDMTDepart':
case 'esriDMTStraight':
case 'esriDMTRoundabout':
case 'esriDMTStop':
modifier = null;
break
default:
modifier = this._leftOrRight(attributes.maneuverType);
}
return modifier && this._camelCase(modifier);
},

setting the parameter below will ensure more information is returned.

vrpTask.setParam("directions_style_name", "NA Navigation");

from lrm-esri.

Related Issues (6)

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.