Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hyperlapse #41

Open
miuratakuma opened this issue Apr 26, 2017 · 0 comments
Open

hyperlapse #41

miuratakuma opened this issue Apr 26, 2017 · 0 comments

Comments

@miuratakuma
Copy link

var hyperlapse = new Hyperlapse(document.getElementById('pano'), {
lookat: new google.maps.LatLng(37.81409525128964,-122.4775045005249),
zoom: 1,
use_lookat: true,
elevation: 50
});

hyperlapse.onError = function(e) {
console.log(e);
};

hyperlapse.onRouteComplete = function(e) {
hyperlapse.load();
};

hyperlapse.onLoadComplete = function(e) {
hyperlapse.play();
};

// Google Maps API stuff here...
var directions_service = new google.maps.DirectionsService();

var route = {
request:{
origin: new google.maps.LatLng(37.816480000000006,-122.47825,37),
destination: new google.maps.LatLng(37.81195,-122.47773000000001),
travelMode: google.maps.DirectionsTravelMode.DRIVING
}
};

directions_service.route(route.request, function(response, status) {
if (status == google.maps.DirectionsStatus.OK) {
hyperlapse.generate( {route:response} );
} else {
console.log(status);
}
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant