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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T19:35:35+00:00 2026-06-04T19:35:35+00:00

I am using Google Maps API v3 , and have several map markers that

  • 0

I am using Google Maps API v3, and have several map markers that link to different pages. When onmouseover the status bar is not displaying the url, however when the marker is clicked it does display the url loading text in the status bar.

It seems that my code is conflicting with the status bar in some way, or do you have to specify a property to show the status bar? Here is my code:

function initialize(mapInfo)
{       
    // object literal for map options
    var myOptions =
    {
        center: new google.maps.LatLng(30, 3), // coordinates for center of map
        zoom: 2, // smaller number --> zoom out
        mapTypeId: google.maps.MapTypeId.HYBRID // ROADMAP, SATELLITE, TERRAIN, or HYBRID
    };

    // note: if the id has a dash in its' name, map instantiation doesn't work!
    var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);

    // MAP MARKERS instantiated here
    for(var i = 0; i < mapInfo.length; i++)
    {
        var link = mapInfo[i].link;
        var name = mapInfo[i].name;
        var lat = mapInfo[i].lat;
        var lng = mapInfo[i].lng;

        // object literal for each map marker
        var marker = new google.maps.Marker(
        {
            url: link,
            title: name,
            position: new google.maps.LatLng(lat, lng),
            map: map
        });

        // setting the link to each map marker here
        setLink(marker);

        // setting each map marker here
        marker.setMap(map);
    }
} // end of function initialize()

function setLink(mapMarker)
{
    // event listener for marker links added to each marker
        google.maps.event.addListener(mapMarker, "click", function()
       {
             window.location.href = mapMarker.url; // obtaining the url from the object literal
       });
}

…I am getting the object-literal mapInfo (passed into the function initialize) from Ajax, parsed with JSON–just to clarify the mapInfo properties.

********************************EDIT: **********************************

Here is a solution, simply putting the link in an infowindow instead:

        // object literal for each map marker
        var marker = new google.maps.Marker(
        {
            //url: link,
            title: name,
            content: "<a href = " + link + ">" + name + "</a>",
            position: new google.maps.LatLng(lat, lng),
            map: map
        });

        setWindow(map, marker);
function setWindow(map, mapMarker)
{
    // event listener for marker links added to each marker
        google.maps.event.addListener(mapMarker, "click", function()
        {
        var infowindow = new google.maps.InfoWindow(
        {
            content: mapMarker.content
        });
                    infowindow.open(map, mapMarker);
        });
}
  • 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-04T19:35:36+00:00Added an answer on June 4, 2026 at 7:35 pm

    TL;DR: Can’t be done.


    Your question is basically “How do I set the text of the status bar to the link when I mouseover the marker?”

    So you need a mouseover handler to set the text, and a mouseout handler to put it back again.

    function setLink(mapMarker)
    {
        google.maps.event.addListener(mapMarker, "click", function() {
            window.location.href = mapMarker.url;
           });
        google.maps.event.addListener(mapMarker, "mouseover", function() {
            window.status = mapMarker.url;
            return true; // apparently this is necessary for window.status
           });
        google.maps.event.addListener(mapMarker, "mouseout", function() {
            window.status = '';
            return true;
           });
    }
    

    But see Reliable cross browser way of setting Status bar text — you can’t do it because browsers disable it. Once the url is loading, the browser itself displays it in the status bar as part of normal functionality.

    One way which would work is to make the relevant marker image a link, because the browser’s normal functionality would take over and display the url in the status bar. Unfortunately the API doesn’t expose the various parts of a marker to make this possible either.

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

Sidebar

Related Questions

I have a map with multiple markers of companies using google maps API v3.
I'm using the Google Maps Javascript API so that I can have someone put
I have a page in my project that's using the google maps api along
I'm using google maps api to have a map show up on my website
I'm using the Google Maps API and have added markers. Now I want to
I have a function that geo-tags items using Google Maps API based on basic
I am using google maps api to place markers on a map. The gps
I created a map using Google Maps API that highlights all Minnesota counties. Basically,
I'm using the Google Maps Javascript API and I have LatLng coordinates that are
I have made a very simple page using google maps API with several fields

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.