I am here new. Please help me. I set Google map road direction on my page. 
But Road map only shows Mozilla and IE.
My JS code is...

function init_map() {
map = new google.maps.Map(document.getElementById("map"), {
zoom: 4,
mapTypeId: 'roadmap',
//scrollwheel: false,
mapTypeControlOptions: {style: 
google.maps.MapTypeControlStyle.DROPDOWN_MENU}
});
infoWindow = new google.maps.InfoWindow();
}

function calcRoute() {
  var end=document.getElementById("end").value;
var start=document.getElementById("start").value;
directionsDisplay = new google.maps.DirectionsRenderer();
var settings ={
zoom: 4,
mapTypeId: 'roadmap',
mapTypeControlOptions: {style: 
google.maps.MapTypeControlStyle.DROPDOWN_MENU}
};
var map = new google.maps.Map(document.getElementById("map"),settings);
directionsDisplay.setMap(map);
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);
}
else {
alert('Error: ' + status);
  }
});
}

Please also see webpage 
link: http://marijuanamedicinedoctor.com/store_locator/index.php

When i clicked on "Get Direction" it called "calcRoute" function.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-maps-js-api-v3/-/utoBWMpQGqkJ.
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.

Reply via email to