I am trying to build a little tool using google maps API. I thought With the use of the distanceMartrix api I could actually do this with just html/javascript
$.get("http://maps.googleapis.com/maps/api/distancematrix/json?origins=Vancouver+BC&destinations=San+Francisco|Victoria+BC&sensor=false", function(data){
alert("Hello world");
});
the above code fails to success on the alert. I can get it to alert before the function and I have jquery commands before this which all perform fine. So what is going wrong in this incredibly simple statement? (im guessing its something stupid because im tired!!)
looks like you need to include google maps v3 js library via tag
scriptand then use this service http://code.google.com/apis/maps/documentation/javascript/reference.html#DistanceMatrixServicethere will be somethnmg like this
`
UPD:
I have some trobles with formatting code, but I hope you guess what I mean.