1var settings = {
2 'cache': false,
3 'dataType': "jsonp",
4 "async": true,
5 "crossDomain": true,
6 "url": "https://maps.googleapis.com/maps/api/distancematrix/json?units=metric&origins=place_id:"+me.originPlaceId+"&destinations=place_id:"+me.destinationPlaceId+"®ion=ng&units=metric&key=mykey",
7 "method": "GET",
8 "headers": {
9 "accept": "application/json",
10 "Access-Control-Allow-Origin":"*"
11 }
12 }
13
14 $.ajax(settings).done(function (response) {
15 console.log(response);
16
17 });