When I pass zipcodes from Holland, the API returns one location from Holland and one from Belgium. Here's my code:
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDbxcI_JLMuvKyeQGdho5bF0F0cj8eCGCU"></script>
<script>
origin = "3034, Netherlands";
destination = "9000, Netherlands";
var service = new google.maps.DistanceMatrixService();
service.getDistanceMatrix(
{
origins: [origin],
destinations: [destination],
travelMode: google.maps.TravelMode.DRIVING,
avoidHighways: false,
avoidTolls: false
}, callback);
function callback(response, status) {
console.log(response);
}
</script>
And this is the result:
Object {rows: Array[1], originAddresses: Array[1], destinationAddresses: Array[1]}
destinationAddresses: Array[1]
0: "9000 Gent, België"
length: 1
__proto__: Array[0]
originAddresses: Array[1]
0: "3034 Rotterdam, Nederland"
Can anyone tell me how to get results that are restricted to areas in the Netherlands? Thanks in advance.