Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8328551
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T01:28:55+00:00 2026-06-09T01:28:55+00:00

I have used the google map API to plot a way point on google

  • 0

I have used the google map API to plot a way point on google map

I referred to the the following page:

https://developers.google.com/maps/documentation/javascript/directions

‘Using Waypoints in Routes section’ and modified it a bit so as to plot only 3 points on the map.
The following is my javascript code.

var directionDisplay;
var directionsService = new google.maps.DirectionsService();
var map;

function initialize() {
    directionsDisplay = new google.maps.DirectionsRenderer();
    var initialloc = new google.maps.LatLng(12.971599, 77.594563);
    var mapOptions = {
        zoom : 6,
        mapTypeId : google.maps.MapTypeId.ROADMAP,
        center : initialloc
    }
    map = new google.maps.Map(document.getElementById('map_canvas'), mapOptions);
    directionsDisplay.setMap(map);
    calcRoute();

}

function calcRoute() {
    var lat = new Array();
    var lon = new Array();

    var start = new google.maps.LatLng(12.971599,77.594563);
    var mid = new google.maps.LatLng(12.971558,77.594552);
    var end = new google.maps.LatLng(12.971558,77.594552);

    var waypts = [];
    waypts.push( {
        location : mid,
        stopover : true
    });


    var request = {
        origin : start,
        destination : end,
        waypoints : waypts,
        optimizeWaypoints : true,
        travelMode : google.maps.DirectionsTravelMode.DRIVING
    };
    directionsService.route(
                    request,
                    function(response, status) {
                        if (status == google.maps.DirectionsStatus.OK) {
                            directionsDisplay.setDirections(response);
                            var route = response.routes[0];

                        }
                    });

}

which works perfectly fine if the 3 locations are within same country, ie they have a road map.

My question is how to plot the map when the location are in different continents eg India and Australia?

Can anyone please help.

Thanks in Advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T01:28:56+00:00Added an answer on June 9, 2026 at 1:28 am

    The problem is not about different continents, but whether the routing engine’s database has information about all the countries between your start and endpoints, including car ferries. You can see that the same occurs in maps.google.com . Here’s an intercontinental route from Europe to India, but if you try to move the B marker to the US or Canada, it doesn’t get a route because it doesn’t know a ferry across the Atlantic.
    You can see what countries have coverage in this spreadsheet.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Google Map (API 2) that used to work fine as a
I want to Display Google Map into my wordpress site. I have used below
I have used this code (kind of tutorial) at http://code.google.com/p/gwt-examples/wiki/gwt_hmtl5 ... In this code,
I currently have Google Maps integrated into my webpage. It is being used to
I use the Google Maps API (v.3) to show a map with a couple
I have generated a Google map key by login as a user1@gmail.com . Is
Can the API for Google Maps be used to retrieve the latitude and longitude
Have used google maps dozens of times but cannot get around this one. Doing
I am using a google map with the full maps api on my website.
I have a requirement and I am hoping Google Maps API will have a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.