R360.js – JavaScript API

Getting started

The Route360° JavaScript API by Motion Intelligence is a modern open-source JavaScript library designed for mobile-friendly interactive maps. It currently supports Leaflet as well as Google Maps. The API is free of charge and can be altered and forked as you wish. Since this API makes requests to the Route360° webservice, you need to contact us to get your free application key. We provide a development version of the Route360° webservice, which can be used for development purposes only. We do not guarantee service uptime at any point. The Route360° JavaScript-API is separated into three different libraries:

The r360-core.js (concatenated and minified) and the r360-core-src.js (human readable), contain all the neccessary classes to parse the result from the Route360° service to generate the polygon SVG. It has no dependency to any mapping library (Leaflet or Google Maps).
The r360-leaflet.js (concatenated and minified) and the r360-leaflet-src.js (human readable), contain all the neccessary classes to to display the polygons on a Leaflet map. Addionally all the map controls examplified in the examples section below are contained in this library. You have to also include the leaflet.js and leaflet.css files.
The r360-google.js (concatenated and minified) and the r360-google-src.js (human readable), contain all the neccessary classes to to display the polygons on a Google Maps map.You have to also include the the Google Maps API V3 library.

Download the R360°-library

You can download the latest version of our library here. Alternatively, you can install the libray using bower, just enter bower install route360 --save.

Then, include our library and the CSS stylesheet in your HTML header:

See the Pen Embedding r360.js by Route360 (@route360) on CodePen.

That's it, you are ready to go to! For help, see our Quick start guide.