Documentation

Preference based navigation

Moving from one point to the other within a building has now got even simpler with preference-based navigation feature in our indoor maps. This special feature allows the user to find the shortest route for reaching from point A to B and that too in a customized way. The user can choose whether they would like to use stairs, elevators or escalators for navigating.

To enable this feature you need to have the access to Micello's enhanced navigation product. Once you have the access you can set the enhanced navigation option to true while loading the community.

community = L.micello.community(cid, {
    key: "YOUR API KEY",
    enhancedNav: true
}).addTo(map);

Once you turn on the enhanced navigation, you can set your route preference. Some of the adjustments are as follow:

[{"tag":"escalator","restrict":true},{"tag":"stairs","restrict":true}]  //restrict stairs and escalator
[{"tag":"elevator","restrict":true},{"tag":"stairs","restrict":true}] //restrict stairs and elevators
[{"tag":"elevator","restrict":true},{"tag":"escalator","restrict":true}] //restrict stairs and elevators
[{"tag":"elevator","off":50}]; //penalize, but don't restrict
[{"tag":"escalator","off":50},{"tag":"stairs","off":50}]; //penalize, but don't restrict
[{"tag":"escalator","off":50}]; //penalize, but don't restrict
[{"tag":"elevator","off":50},{"tag":"stairs","off":50}]; //penalize, but don't restrict
[{"tag":"stairs","off":50}]; //penalize, but don't restrict
[{"tag":"escalator","off":50},{"tag":"elevator","off":50}]; //penalize, but don't restrict

You can use any of the above adjustments in your navigation call. For example, if I want my users to use only Elevators, navigation code will look something like this:

var adjustments = [{"tag":"escalator","restrict":true},{"tag":"stairs","restrict":true}];
nav = community.getNavigation();
nav.routeInit (routeFrom, routeTo, routeDetails, adjustments);