I have a select query (really long) based on which I want to create a layer on google maps. I tried the same query in cartodbo map editor(online) it worked fine. But when I wrote a code to access the same data via javascript its failing with the error
http://myusername.cartodb.com/api/v...P0X8G/njsaKGG3A==&callback=_cdbc_2758786579_1 here is my code
var mapOptions = { zoom: 8, center: new google.maps.LatLng(38.328732,-85.764771), mapTypeId: google.maps.MapTypeId.ROADMAP }; map = new google.maps.Map(document.getElementById('map'), mapOptions); cartodb.createLayer(map, { user_name: 'myusername', type: 'cartodb', sublayers: [{ sql: "SELECT * FROM cartodb1 where zcta5ce10 in (" + zipList + ")", cartocss: '#cartodb1 {polygon-fill: #FF6600;polygon-opacity: 0.7;line-color: #FFF;line-width: 0.5;line-opacity: 1;}'}] }) .addTo(map) // add the layer to our map which already contains 1 sublayer .done(function(layer) { console.log('Fine'); }) .error(function(e) { console.log(e); }); }where zip list is quite huge so I posted it separately here http://textuploader.com/ase80
أكثر...
http://myusername.cartodb.com/api/v...P0X8G/njsaKGG3A==&callback=_cdbc_2758786579_1 here is my code
var mapOptions = { zoom: 8, center: new google.maps.LatLng(38.328732,-85.764771), mapTypeId: google.maps.MapTypeId.ROADMAP }; map = new google.maps.Map(document.getElementById('map'), mapOptions); cartodb.createLayer(map, { user_name: 'myusername', type: 'cartodb', sublayers: [{ sql: "SELECT * FROM cartodb1 where zcta5ce10 in (" + zipList + ")", cartocss: '#cartodb1 {polygon-fill: #FF6600;polygon-opacity: 0.7;line-color: #FFF;line-width: 0.5;line-opacity: 1;}'}] }) .addTo(map) // add the layer to our map which already contains 1 sublayer .done(function(layer) { console.log('Fine'); }) .error(function(e) { console.log(e); }); }where zip list is quite huge so I posted it separately here http://textuploader.com/ase80
أكثر...