Russian readme available here
A module for MagicMirror designed for displaying routes on map, using Yandex API. Design is based on MMM-google-route .
This module provides the following functions:
- Build three car routes from point 'origin' to point 'destination', using traffic information.
- Display builded routes on the map. The map will be autoscaled to show entire route.
- Show best route information, such as travel time and distance.
Clone this repository to modules directory: MagicMirror/modules/
In configuration file config/config.js add module to modules array:
//other modules
{
module: "MMM-yandex-route",
position: "bottom_center",
config:
{
key: 'yandex-map-api-key', //something like '0392e180-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
origin: [55.0,37.0],
destination: [55.5,37.5],
refreshPeriod: 5, //5 minutes
height : "480px", //height of map
width : "720px", //width of map
title : "Route title"
}
},
//other modules
Option | Description |
---|---|
key | The Yandex-Maps API key |
origin | Geocoordinates of start point |
destination | Geocoordinates of stop point |
refreshPeriod | The time (in minutes) between two route refreshes |
height | Height of the map |
width | Width of the map |
title | Title, that will be displayed above the map |
You can obtain an api-key for Yandex-Maps at https://tech.yandex.ru/maps/
To do this you should create developer account and email at yandex.