Skip to content

Instantly share code, notes, and snippets.

@dmtpln
Last active March 12, 2020 11:24
Show Gist options
  • Save dmtpln/c870f7f25affec4e42f2f6a3dae45d75 to your computer and use it in GitHub Desktop.
Save dmtpln/c870f7f25affec4e42f2f6a3dae45d75 to your computer and use it in GitHub Desktop.
Получить расстояние и время между координатами через API яндекс.карты
ymaps.ready(init);
function init() {
ymaps.route([
{ type: 'wayPoint', point: [55.812511, 37.315518] },
{ type: 'wayPoint', point: [55.811511, 37.312518] }
], {
avoidTrafficJams: false
}).then(function (route) {
console.log(route.properties.get('RouterRouteMetaData'));
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment