Quickstart

Get started with indoorgraphs

To use this package, you will need to install Nodejs and the indoorgraphs package. You can install Nodejs from the official Nodejs website (https://nodejs.org/en), and the indoorgraphs package can be installed using npm:

npm install indoorgraphs;

The package and a previously created graph can then be imported into a JavaScript environment:

// import indoorgraphs package
const { IndoorGraphs } = require("indoorgraphs");

// import routing graph
const data = require("./graph.json")

// instantiate a graph object and pass the routing data, routing options and a filter
const graph = new IndoorGraphs(data)

// calculate shortest path
const [coordinates, path, instructions, error] = graph.getRoute('EG_1', 'EG_2');

Last updated