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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:16:38+00:00 2026-05-26T00:16:38+00:00

I have build an application to search my location. Here is the code var

  • 0

I have build an application to search my location.

Here is the code

var map;
var gdir;
var geocoder = null;
var addressMarker;   

function initialize() {
    if (GBrowserIsCompatible()) {      
        map = new GMap2(document.getElementById("map_canvas"));
        gdir = new GDirections(map, document.getElementById("directions"));
        GEvent.addListener(gdir, "load", onGDirectionsLoad);
        GEvent.addListener(gdir, "error", handleErrors);
        map.setCenter(new GLatLng(51.519853,-0.122566), 14)
        var point = new GLatLng(51.519853,-0.122566); //CHANGE THESE COORDINATES
        map.addOverlay(new GMarker(point));
        map.openInfoWindow(map.getCenter(),html)
    }
}  

function setDirections(fromAddress) {
    gdir.load("from: " + fromAddress + " to: 51.519741,-0.122596 ");
}  

function handleErrors(){
    if (gdir.getStatus().code == G_GEO_UNKNOWN_ADDRESS) {
        alert("No corresponding geographic location could be found for one of the specified addresses. This may be due to the fact that the address is relatively new, or it may be incorrect.\nError code: " + gdir.getStatus().code);
    } else if (gdir.getStatus().code == G_GEO_SERVER_ERROR) {
       alert("A geocoding or directions request could not be successfully processed, yet the exact reason for the failure is not known.\n Error code: " + gdir.getStatus().code);
    } else if (gdir.getStatus().code == G_GEO_MISSING_QUERY) {
       alert("The HTTP q parameter was either missing or had no value. For geocoder requests, this means that an empty address was specified as input. For directions requests, this means that no query was specified in the input.\n Error code: " + gdir.getStatus().code);           
    } else if (gdir.getStatus().code == G_GEO_BAD_KEY) {
       alert("The given key is either invalid or does not match the domain for which it was given. \n Error code: " + gdir.getStatus().code);    
    } else if (gdir.getStatus().code == G_GEO_BAD_REQUEST) {
       alert("A directions request could not be successfully parsed.\n Error code: " + gdir.getStatus().code);    
    } else {
       alert("An unknown error occurred.");
    }
}

function onGDirectionsLoad(){} 

it is working fine. but there is no navigation keys.
could any one tell me that how can I activate it please

  • 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-05-26T00:16:38+00:00Added an answer on May 26, 2026 at 12:16 am

    If you are trying to put different pan controls on the screen (e.g. the four directional icons commonly found on google maps), you may want to take a look at this control tutorial for version 2 of the Google Maps Javascript API.

    Basically, that link describes under what circumstances which controls automatically appear. But, if you want to force controls into your google map, you can do it as follows:

    function initialize() {
        //assuming 'map' already exists...
        //add a large pan / zoom control to the map
        map.addControl(new GLargeMapControl());
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an application build in C# for reading and saving SMS and MMS,
I have to build a GUI application on Windows Mobile, and would like it
I have to build a web application that's similar to a branch/store locater. A
I have used JMS in the past to build application and it works great.
I have a flex application build with actionscript 3 on flex builder with unit
I have a WorldWind application build based on the Java SDK. It has a
I have a simple ticket logging application build on LAMP. I am currently playing
I'm going to have to build a custom control for a WinForms application. But
I have a small problem with UINavigationController animation between two view. My application build
I have been asked to build a web application that will be used to

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.