wiki:Design/Route

Route

Route is

  • origin
  • destination
  • a list of waypoints

Structure and ADT

var reqJiri = {
    origin: "Jiri,45500,Nepal",
    destination: "Lukla,Chaurikharka 56000,Nepal",
    travelMode: google.maps.TravelMode.WALKING,
    provideRouteAlternatives: true,
    unitSystem: google.maps.UnitSystem.METRIC,
    waypoints: [{
        location: "Shivalaya,45500,Nepal",
        stopover: false
    },{
        location: "Deurali Bazaar,45500,Nepal",
        stopover: false
    },{
        location: "Kinja,45400,Nepal",
        stopover: true
    },{
        location: { lat: 27.572448, lng: 86.487334 },
        stopover: false
    },{
        location: "Lamjura Pass,5600,Nepal",
        stopover: false
    },{
        location: "Junbesi,Dudhakunda 56000,Nepal",
        stopover: false
    },{
        location: { lat: 27.592298, lng: 86.617466 },
        stopover: false
    },{
        location: "Nunthala (Mani Dingma),Takasindu 56000,Nepal",
        stopover: true
    },{
        location: { lat: 27.594100, lng: 86.678479 },
        stopover: false
    },{
        location: "Kharikhola,56000,Nepal",
        stopover: true
    },{
        location: "Paiya 56000,Nepal",
        stopover: false
    },{
        location: { lat: 27.667846, lng: 86.710436 },
        stopover: false
    },{
        location: "Surke,Chaurikharka 56000,Nepal",
        stopover: false
    }]
};

Split by days

var trek =
    [
        {
            origin: 'Lukla,Chaurikharka 56000,Nepal',
            destination: 'Namche Bazar,56000,Nepal',
            waypoints: [{
                location: 'Phakding,56000,Nepal',
                stopover: true
            }, {
                location: 'Manjo,Khumjung 56000,Nepal',
                stopover: false
            }]
        }, {
            origin: 'Namche Bazar,56000,Nepal',
            destination: 'Phortse,Khumjung 56000,Nepal',
            waypoints: [{
                location: { lat: 27.8396097, lng: 86.7360727 },
                stopover: false
            }, {
                location: { lat: 27.8512852, lng: 86.7452944 },
                stopover: false
            }]
        }, {
            origin: 'Phortse,Khumjung 56000,Nepal',
            destination: 'Chukhung,56000,Nepal',
            waypoints: [{
                location: 'Panboche,Khumjung 56000,Nepal',
                stopover: false
            }, {
                location: 'Shomare,Khumjung 56000,Nepal',
                stopover: false
            }]
        }, {
            origin: 'Chukhung,56000,Nepal',
            destination: 'Gorakshep,Khumjung 56000,Nepal',
            waypoints: [{
                location: 'Pheriche,Khumjung 56000,Nepal',
                stopover: false
            }, {
                location: 'Lobuche,Khumjung 56000,Nepal',
                stopover: false
            }]
       }
];
Last modified 3 years ago Last modified on Apr 10, 2017, 12:02:29 PM
Note: See TracWiki for help on using the wiki.