'var layerUrl' shows up fine as long as there isn't a layer after it that is trying to be placed on the same map. The second I add another layer on the map, that layer shows and the first layer disappears. In my example, the layer which shows (layerUrl3) has European Countries which causes my initial layer of American counties not to show. If you take out 'createLayer' for layerUrl3 however, the American counties show again. So essentially, I can only get it to show one at a time. My js code is below and I greatly appreciate your feedback.
function initialize()
{
var latlng = new google.maps.LatLng(40,260);
var latlng2 = new google.maps.LatLng(43,0);
var myOptions =
{
zoom: 4,
center: latlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var myOptions2 =
{
zoom: 4,
center: latlng2,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
var map2 = new google.maps.Map(document.getElementById("map2_canvas"), myOptions2);
/*MAP 1*/
cartodb.createLayer(map, layerUrl, function(layer) {
map.overlayMapTypes.setAt(0, layer); });
cartodb.createLayer(map2, layerUrl2, function(layer) {
map2.overlayMapTypes.setAt(0, layer); });
cartodb.createLayer(map, layerUrl3, function(layer) {
map.overlayMapTypes.setAt(0, layer); });
}
window.onload = initialize;