Tell me more ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have a javascript web mapping application code built using previous SQL API which has been deprecated recently. I also used JSON to give back results. Now I want to migrate to new fusion table API. I have gone through migration guide but it doesn't make sense. I do not know exactly what to change. I have two tables on one map so 2 API Keys and 2 table keys. After putting them there is no map displayed. Also I have turned ON the API in the console.

var map;
var queryUrlHead = 'http://www.google.com/fusiontables/api/query?sql=';
var queryUrlTail = '&jsonCallback=?';

//url.push('&key=AIzaSyDbZCuKQMgxAMYUatCsohcJkVSXYKhrKAU');
//url.push('&key=AIzaSyBC6PHfBV6HogU1bGaC5edvM_EPvGpT56c');

var layer_1;
var layer_2;
//var tableid_1 = 3775630;
//var tableid_2 = 4313734;
var tableid_1 = 18nnNfr7P_eelXCCOsK-uOFnIWcR2ofIUGLUk4nk;
var tableid_2 = 1mm0HGszLM3_flfblLnddnmvmQr02W-RwEGQxl2w;


function initialize() {
var latlng = new google.maps.LatLng(33.7071,-111.3024);

map = new google.maps.Map(document.getElementById('map_canvas'), {
    center: latlng,
    zoom: 7,
    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 layer_1 = new google.maps.FusionTablesLayer(tableid_1);
....
....
var col_list = 'Name';

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

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



$.ajax({
    type : "GET",
    url : queryurl,
    dataType : "jsonp",
    success : dataHandlerCallback,
    error : function() {
        alert("AJAX ERROR for " + queryurl);
    }
});
}
share|improve this question

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.