I have this javascript which I am working on but the map in the HTML is just not displaying. I have a similar fusion table with layer_1 which is displaying fine but when I put layer-2 instead of layer_1 and pull up a different tableid with same code. The map does not show up.

var tableid_2 = 431xxxx; 
var layer_2;
var queryUrlHead = 'http://www.google.com/fusiontables/api/query?sql=';
var queryUrlTail = '&jsonCallback=?';
var zoom = 7;
var latlng = new google.maps.LatLng(3x.7996, -11x.1668);

function initialize() {

var myOptions = {
    zoom : zoom,
    center : latlng,
    mapTypeId : google.maps.MapTypeId.TERRAIN,
    mapTypeControl: true,
    mapTypeControlOptions: {
    style: google.maps.MapTypeControlStyle.HORIZONTAL_BAR,
    position: google.maps.ControlPosition.TOP_LEFT
    scaleControl: true,
    scaleControlOptions: {
    position: google.maps.ControlPosition.BOTTOM_LEFT

var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);

layer_2 = new google.maps.FusionTablesLayer(tableid_2);
var qry = "SELECT 'Location2', 'Name2','URL' FROM " + tableid_2;
        select: "'Name2'",
        from: tableid_2,
        geometryColumn: 'Location2', 
        suppressMapTips: false, 
        delay: 50,
        tolerance: 5


var col_list = 'Name2';

if(order_list && order_list !== 'Name2') {
    query += " ORDER BY " + order_list;

var queryurl = encodeURI(queryUrlHead + qry + queryUrlTail);

    type : "GET",
    url : queryurl,
    dataType : "jsonp",
    success : dataHandlerCallback,
    error : function() {
        alert("AJAX ERROR for " + queryurl);
  • What is going on with your code new google.maps.LatLng(3x.7996, -11x.1668); ?
    – tmcw
    Commented Jun 26, 2012 at 17:27

1 Answer 1


If the code really works for Layer 1 then the only thing that I can think of is to double check to make sure that your second Google Fusion Table is not set as private file, which is the default setting when uploading new data if I recall correctly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.