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 8003927
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T16:46:56+00:00 2026-06-04T16:46:56+00:00

I would like to alter the default display of the direction map to either:

  • 0

I would like to alter the default display of the direction map to either:

  • Display a zoomed image of the end-point with the route indicated in blue
  • Display a zoomed-balloon along with the end-point-marker (http://www.birdwingfx.com/jQuery_gps/demo_gps/gps_demo.html)

I made this basic script which only shows the entire route:

<!DOCTYPE html>
<html>
  <head>
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
    <style type="text/css">
      html { height: 100% }
      body { height: 100%; margin: 0; padding: 0 }
      #map_canvas { height: 100% }
    </style>
    <script type="text/javascript"
      src="http://maps.googleapis.com/maps/api/js?key=AIzaSyBSHoB4rbbeXHf_KfV-pONQvTiSLIJH_G8&sensor=false">
    </script>
    <script type="text/javascript"> 
        var directionsDisplay;
        var directionsService = new google.maps.DirectionsService();
        var map;
        var bilzen = new google.maps.LatLng(50.87228390728491, 5.512539388885443);

        function initialize() {
            directionsDisplay = new google.maps.DirectionsRenderer();
            var Bilzen = new google.maps.LatLng(50.87228390728491, 5.512539388885443);
            var myOptions = {
                zoom:11,
            mapTypeId: google.maps.MapTypeId.ROADMAP,
            center: bilzen
        }
    map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
    directionsDisplay.setMap(map);
    }

  function calcRoute() {
    var start = document.getElementById("start").value;
    var end = document.getElementById("end").value;
    var request = {
        origin:start, 
        destination:end,
        travelMode: google.maps.DirectionsTravelMode.DRIVING,
        unitSystem: google.maps.DirectionsUnitSystem.metric
};
directionsService.route(request, function(response, status) {
  if (status == google.maps.DirectionsStatus.OK) {
    directionsDisplay.setDirections(response);
  }
});
  }
    </script>
  </head>
  <body onload="initialize()">
<form action="#" onsubmit="calcRoute(); return false;" >
    <input name="start" id="start" value="start" type="text">
    <input name="end" id="end" value="end" type="text">
    <input name="Submit" type="submit">
    </form>

    <div id="map_canvas" style="width:100%; height:100%"></div>
  </body>
</html>
  • 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-04T16:46:58+00:00Added an answer on June 4, 2026 at 4:46 pm

    I have something of a hack here: http://jsfiddle.net/mR2LV/6/ click submit then click on the red car icon to open the Infowindow.

    This script assumes the path is only point A to point B (simple). It uses two separate maps, one that goes into the Infowindow “bubble” and the overall map. The idea is to keep two copies of the same information, and use one for the “zoom”. The route is in the variable path.

    minimap = new google.maps.Map(document.getElementById("minimap"), miniOptions);
    
    if(document.getElementById("minimap")) {
        document.getElementById("minimap").style.display= "block";
        infomap.setContent(document.getElementById("minimap"));
    }
    
    var path = response.routes[0].overview_path;
    
    
    google.maps.event.addListener(endMarker, 'click', function(event) {
        infomap.open(map, this);
        google.maps.event.trigger(minimap, 'resize'); 
        minimap.setCenter(path[path.length-1]);
    });
    
    
    <div id="map_canvas" style="width:100%; height:100%"></div>
    <div id="minimap" style="width: 220px; height:200px; display: none"></div>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello I would like to display an other splashscreen after the default one, if
I would like to alter two different tables from an HTML post request to
I would like to make a view , and in that view alter the
I would like to overwrite a default message for posting a comment. For example,
I'd like to display argparse help for my options the same way the default
I would like to alter the way all colors are being displayed by a
I would like to display the details of the first model in Backbone by
currently i have a image html statement and i would like to add it
I have a string would like everything after the last / to be returned.
I have a WCF service with many methods. I would like that after executing

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.