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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T11:56:44+00:00 2026-06-15T11:56:44+00:00

Gotta start off by saying I’m a javascript newbie…. I borrowed some code example

  • 0

Gotta start off by saying I’m a javascript newbie….

I borrowed some code example from the following question on stackoverflow.com:

Google Maps JS API v3 – Simple Multiple Marker Example with Custom Markers

The problem is that when I’ve added in some styling to the infoWindow, the hover is showing all the html garbage:
I’m too new to upload an image, but here is a working link that will show the problem.

link: http://www.conleym.com/map/google_maps_code_10_zoom_working.html

So my question is – is there an easy way to eliminate the style information on the hover, or is there a way to just disable the hover so the user won’t see it?

Here is an example of what I’ve used:

['<a style="font-family: Arial" href="http://www.mfah.org/" target="_blank"><b>The Holocaust Museum</b></a><br><span style="font-size: 12px; font-family: Arial;">1001 Bissonnet Street<br> Houston, TX 77005<br>(713) 639-7300<br></span>', 29.725472,-95.386033, 4, 'http://www.conleym.com/map/icons/star-3.png'],

Thanks in advance for any help.

  • 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-15T11:56:45+00:00Added an answer on June 15, 2026 at 11:56 am

    The createMarker function was really designed for markers with plain text titles. I would suggest modifying that function to accommodate the additional pieces of information you have, namely: link (URL), address, and phone.

    Instead of using the same myTitle for both the contentString for the info window and the hover-over text (title), you should create the HTML markup within the function, based on the supplied title, link, address, and phone. The createMarker function becomes:

    function createMarker(latlng, myTitle, myLink, myAddress, myPhone, myNum, myIcon) {
        var contentString = '<a style="font-family: Arial" href="' +
            myLink + '" target="_blank">' + myTitle +
            '</a><br><span style="font-size: 12px; font-family: Arial;">ADDRESS<br> ' +
            myAddress + '<br>PHONE<br>' + myPhone + '</span>';
    
        var marker = new google.maps.Marker({
            position: latlng,
            map: map,
            icon: myIcon,
            zIndex: Math.round(latlng.lat() * -100000) << 5,
            title: myTitle,
        });
    
        // ...
    

    You’ll have to update the call to the function to pass the correct arguments:

    createMarker(new google.maps.LatLng(locations[i][4], locations[i][5]), locations[i][0], locations[i][1], locations[i][2], locations[i][3], locations[i][6], locations[i][7]);
    
    • location[i][0] is the name/title of the location
    • location[i][1] is the link
    • location[i][2] is the address
    • location[i][3] is the phone number
    • location[i][4] is the latitude of the location
    • location[i][5] is the longitude of the location
    • location[i][6] is the myNum (which really isn’t being used anywhere)
    • location[i][7] is URL to the marker icon

    Now, you can encode your data source more cleanly. For example:

    var locations = [    
    
    //====================== ZONE 1 MUSEUMS  ==========================
    //THE MENIL COLLECTION  
        ['The Menil Collection', 'http://www.mfah.org/', 'Houston TX 77006', '(713) 639-7300', 29.737593,-95.398525, 1, 'http://www.conleym.com/map/icons/world.png'],
    
    //ROTHKO CHAPEL 
        ['Rothko Chapel', 'http://www.mfah.org/', 'Houston, TX 77006', '(713) 639-7300', 29.737822,-95.395725, 2, 'http://www.conleym.com/map/icons/world.png'],
    
    //HOUSTON CENTER for PHOTOGRAPY 
        ['Houston Center for Photography', 'http://www.mfah.org/', 'Houston, TX 77006', '(713) 639-7300', 29.738606,-95.397179, 3, 'http://www.conleym.com/map/icons/world.png'],
    
    
    // and so on...
    
    ];
    

    Demo: Before and After

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

Sidebar

Related Questions

here's the trick. gotta convert 'bout 300 files from xls to csv, wrote some
people! I've gotta send messages with attachments. So i've got some code based on
I've gotta be missing something simple here. Take the following code: public IEnumerable<int> getInt(){
Does anyone know how the predicate readterm from Prolog works with facts/database? I gotta
Heyho, I've gotta write a Procedure which Inserts a resultset from a select-statement into
I'm having a bit of trouble with some XML in Java. The following is
gotta a question regarding how to navigate inside the UITableView. Here is the situation:
using the script code below, this returns the images from facebook vertically. ive removed
I gotta a question, but not sure if I understand it right so here
I'm brand new to OOP and I have a question that's gotta be pretty

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.