I calculate the store location/distance of the current user location with Google Maps Directions API. It all works fine, but when I have more then 10 stores, the API stops running (limit on Google Maps Directions API).
I get the current user location with the HTML5 Geolocation:
get_user_location = function(){
if(navigator.geolocation){
navigator.geolocation.getCurrentPosition(add_stores_to_array);
}
};
And I calculate it with the Google Maps Directions Service:
var directionsService = new google.maps.DirectionsService();
var request = {
origin: user,
destination: store,
travelMode: google.maps.DirectionsTravelMode.DRIVING
};
directionsService.route(request, function(response, status) {
if (status == google.maps.DirectionsStatus.OK) {
var response = Math.ceil(response.routes[0].legs[0].distance.value / 1000);
How can I avoid the limit of the current Google Maps Directions Service?