I''d like to use some functionality of the Google Map API in an ajax- request, but i''m having some troubles inplementing that. What i want to use is the possibility of calculating the distance of a route between 2 cities. In this example... http://code.google.com/apis/maps/documentation/examples/directions-simple.html ...are these the two lines that i need (slightly altered) directions = new GDirections(); directions.load("500 Memorial Drive, Cambridge, MA to 4 Yawkey Way, Boston, MA 02215 (Fenway Park)"); After this, the distance is in in directions-object. I''d like to be able to put this in an rjs, but that doesnt work at the moment, since there is some javascript from Google being run in the head of the document and without it, GDirections is unknown. How can i make sure this script is being loaded/run within my rjs- file? I tried pasting the whole contents of that file into my rjs, but it already gives me an error (dynamic constant assignment) on the first line (var G_INCOMPAT = false;) Any ideas on this? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---