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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T02:54:45+00:00 2026-06-10T02:54:45+00:00

I have a map with two fusion tables layers and am using suppressInfoWindows so

  • 0

I have a map with two fusion tables layers and am using suppressInfoWindows so that an infowindow from one layer is not left open when a user clicks on a marker from the other layer. This works fine using the below code:

<script type="text/javascript">
var map;
var infowindow;

var layer;
var tableid = MY FUSION TABLE ID;

var layer2;
var tableid2 = MY FUSION TABLE ID;

function initialize() {

  map = new google.maps.Map(document.getElementById('map_canvas'), {
    center: new google.maps.LatLng(10, 30),
    zoom: 2,
    mapTypeId: google.maps.MapTypeId.ROADMAP
  });

 infoWindow = new google.maps.InfoWindow();

 google.maps.event.addListener(map, "click", function() { infoWindow.close(); });

 layer = new google.maps.FusionTablesLayer(tableid, {suppressInfoWindows:true});
 layer.setQuery("SELECT 'Country Geometry' FROM " + tableid);
 layer.setMap(map);
 google.maps.event.addListener(layer, "click", openIW);

 layer2 = new google.maps.FusionTablesLayer(tableid2, {suppressInfoWindows:true});
 layer2.setQuery("SELECT 'Site Location' FROM " + tableid2);
 layer2.setMap(map);
 google.maps.event.addListener(layer2, "click", openIW);

}

function openIW(FTevent) {
  // infoWindow.setContent(FTevent.infoWindowHtml);
  // infoWindow.setPosition(FTevent.latLng);
  infoWindow.setOptions(
    { 
     content: FTevent.infoWindowHtml,
     position: FTevent.latLng,
     pixelOffset: FTevent.pixelOffset
    });

  infoWindow.open(map);
}

</script>

How can I now add custom html to the infowindow rather than rely on the infowindow settings from Fusion Tables? The code I was using before adding the suppressInfoWindows option was as follows, but I’m not sure how to now add this back in, in the right format. Also, is it possible to use different html code for the infowindows on different layers, or must both layers use the same infowindow? Thanks.

e.infoWindowHtml =  "<div id='SiteInfo' class='googft-info-window' style='font-family: sans-serif; width: 500px; height: 300px; overflow: auto;'>\
            <b>" + e.row['Site Name'].value + "</b><br />\
            </div></div>";
  • 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-10T02:54:47+00:00Added an answer on June 10, 2026 at 2:54 am

    See my example in my answer to your last question on this.

    Example of your map with 2 layers, 1 infowindow

    To implement:

    1. Suppress the infowindows on both layers
    2. Write code to open a shared infowindow when either layer is clicked.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two Fusion Tables that are added as layers to a map visualization.
I have a Google Map that pulls data from Fusion Tables and displays it.
I have an application that has two map views one satellite and one street
I have a public facing interface that I'm trying to map two different enumerations
Using Dozer to map two objects, I have: /** /* This first class uses
We have two images with transparent sections that each have a map and separately
I have two maps of type Map<Long, Integer>, one named oldValues representing the old
I have two overlays, one is (ItemizedOverlay) for placing markers on the map and
I have to map two simple table with a foreign key relationship. One of
I have a big list of properties that I need to map between two

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.