Navigation from current position

In this example, we will navigate from user's current position to a specific geometry on the map. This use case is helpful when we are creating an application with interactive navigation where we can update navigation path, every time user movement is captured. To update the navigation path we need to make new navigation request.

Here start point navigation object will be of type "lll", and destination navigation object will be of type "gid".

var routeFrom = [{
    t: "lll",
    lid: 53615,
    lat: 37.3256595,
    lon: -121.9478141

var routeTo = [{
    t: "gid",
    gid: 6242480,
    lid: 53617

var routeDetails = {
    fromName: "Source",
    toName: "Destination"
var nav = community.getNavigation();
nav.routeInit (routeFrom, routeTo, routeDetails);