On Tue, Mar 1, 2011 at 4:55 PM, sandy037 <[email protected]> wrote:
> Hi all, > I am trying to get the JSON output of directions between two points > using the Directions API Web services. I am using an XmlHttpRequest > (GET Method) in Javascript to get the results but gives me an error > "XMLHttpRequest cannot load > http://maps.googleapis.com/maps/api/directions/json?origin=43.0480556.... > Origin http://localhost:51724 is not allowed by Access-Control-Allow- > Origin." > You can't use XMLHttpRequest to make a request to another domain. The browser doesn't allow that. You can access that web service from your server, or you could use DirectionsService() in the V3 Maps API. -Mike -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.
