I cannot send my JSON array of locations that has latitudes and longitudes to get the optimized route. It shows error code 400. Help please!
No, right now my javascript code looks like this
$("#app2").click(function(event){ console.log("Getting Route"); $.post("url",{ "locations": locations // This is an array }).done(function(msg){ console.log(msg); }).fail(function(){ console.log("error") }); });
No, right now my javascript code looks like this
$("#app2").click(function(event){
console.log("Getting Route");
$.post("url",{
"locations": locations // This is an array
}).done(function(msg){
console.log(msg);
}).fail(function(){
console.log("error")
});
});