HTML and CSS Reference
In-Depth Information
destination: end,
travelMode:
google.maps.DirectionsTravelMode.DRIVING
};
// make the directions request
directionsService.route(request, function
(result, status) {
if (status ==
google.maps.DirectionsStatus.OK) {
// Display the directions using
// Google's Directions Renderer.
directionsRenderer.
setDirections(result);
// output info separately
$('#info').html('Closest Starbucks:
<strong>' + startAddress
+ '</strong><br />' + 'Next
Starbucks: <strong>' + endAddress
+ '</strong>');
} else {
error("Directions failed due to: " +
status);
}
});
}
else {
error('Could not find a Starbucks near ' +
startAddress);
}
}
});
}
else {
error('Could not find a Starbucks near you.');
}
}
});
// if we used MaxMind for location, add attribution link
if (isMaxMind) {
$('body').append('<p><a href="http://www.maxmind.com"
target="_blank">IP to Location Service Provided by
MaxMind</a></p>');
}
});
});
});
 
Search WWH ::




Custom Search