Wednesday, May 25, 2011

[Google Maps API v2] main.js:41 Uncaught TypeError:Object#<object> has no method 'Load'

The registered user of my web app defines the destination on the
google map and and person who enter the source location will get the
direction map on our web app. It was working fine, when are pushing
the data from a dynamic page to a site page. we are unable to get the
direction we are able to see default maps from google.

I have added the code here and also the exception I am getting


Error Name:
main.js:41 Uncaught TypeError:Object#<object> has no method 'Load'


function calcRoute() {
showDirections();
document.getElementById('directionsPanel').innerHTML="";
initialize();
var start = document.getElementById("txt_from").value;
var end =
getDestinationAdderss(document.getElementById('final_address').innerHTML);
var request = {
origin:start,
destination:end,
travelMode: google.maps.DirectionsTravelMode.DRIVING
};
directionsService.route(request, function(response, status) {
if (status == google.maps.DirectionsStatus.OK) {
directionsDisplay.setDirections(response);
}
});

--
You received this message because you are subscribed to the Google Groups "Google Maps API V2" group.
To post to this group, send email to google-maps-api@googlegroups.com.
To unsubscribe from this group, send email to google-maps-api+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-api?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate