journey calculator fix

This commit is contained in:
2018-09-06 17:40:12 +02:00
parent 56b897f51c
commit f60b9820fb
6 changed files with 38 additions and 5 deletions

View File

@@ -89,6 +89,9 @@ function init_map() {
input.parentNode.classList.add('error');
}
var url = 'https://www.google.com/maps/dir/?api=1&origin=' + input.value + '&origin_place_id=' + place['id'] + '&destination=' + encodeURI('Tagesschule Elementa, Sarbachstrasse 8, 6345 Neuheim');
$('.journey_calculator__button').attr('href', url);
var origin = new google.maps.LatLng(place.geometry.location.lat(), place.geometry.location.lng());
var destination = new google.maps.LatLng(location);