]> gitweb.michael.orlitzky.com - dead/census-tools.git/blob - jsroute/map.js
Added the linear program solving the midatlantic region.
[dead/census-tools.git] / jsroute / map.js
1 load('json2.js');
2
3 function init_map() {
4 var directions_service = new google.maps.DirectionsService();
5 var directions_request = {
6 origin: start,
7 destination: end,
8 provideRouteAlternatives: true,
9 travelMode: google.maps.DirectionsTravelMode.DRIVING
10 }
11
12 directions_service.route(directions_request, function(result, status) {
13 if (status == google.maps.DirectionsStatus.OK) {
14 output(JSON.stringify(result));
15 }
16 else {
17 output("Error, status: " + status);
18 }
19 });
20
21 return;
22 }
23
24 function output(data) {
25 print(data);
26 }
27
28 window.onload = init_map;