Documentation

Navigation between two lat/lon points

Just like the navigation between two geometries, you can navigate between two lat/lon coordinates. To do so you need to define start and end point objects. This object requires four properties to be set as shown below.

var routeFrom = [{
    t: "lll",
    lid: 232,
    lat: 37.3256595,
    lon: -121.9478141
}];

Here type "lll" stands for latitude, longitude and level id. All four properties are required. Same way we can create destination object.

var routeTo = [{
    t: "lll",
    lid: 53615,
    lat: 37.32493586468108,
    lon: -121.94290995597841
}];

Now we just need to get micello navigation class object and initiate route request. You can also pass optional route detail object. Complete code looks like this:

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

var routeTo = [{
    t: "lll",
    lid: 53615,
    lat: 37.32493586468108,
    lon: -121.94290995597841
}];

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