I was able to use the layer wizard to allow users to look at specific states using a search bar. This will be helpful if the user wishes to look at a smaller scale of map by state, instead of the entire country comparatively. This can also be done if you were to use a disease outbreak map, similar to the one I mentioned in the last post. With an outbreak map, the layer wizard could be used to create a search bar that would allow the user to search for specific outbreaks on a map…so the creator could have multiple disease outbreaks on one map.
//
// >0″,
from: “1EcVjHVW1MhqOS_OgeVbldAzZxbKOt_3weRLIMcog”
},
map: map,
styleId: 2,
templateId: 2
});
}
function changeMap_0() {
var whereClause;
var searchString = document.getElementById(‘search-string_0’).value.replace(/’/g, “\\'”);
if (searchString != ‘–Select–‘) {
whereClause = “‘name’ = ‘” + searchString + “‘”;
}
layer_0.setOptions({
query: {
select: “col2>>0”,
from: “1EcVjHVW1MhqOS_OgeVbldAzZxbKOt_3weRLIMcog”,
where: whereClause
}
});
}
google.maps.event.addDomListener(window, ‘load’, initialize);
// ]]>
Dear sbk — At present, your visualization does not appear in this post. It appears that you attempted to paste the Google Fusion Tables layer wizard code directly into the WordPress post, which does not work.
But the good news is that by pasting everything as you did, I managed to find your Google Fusion Tables table ID for your coal plant map, which allowed me to view the interactive version. When you select Map > Publish, it produces a live link, which I’ll paste here:
https://www.google.com/fusiontables/embedviz?q=select+col2%3E%3E0+from+1EcVjHVW1MhqOS_OgeVbldAzZxbKOt_3weRLIMcog&viz=MAP&h=false&lat=44.81147735084513&lng=-100.15714375000005&t=1&z=3&l=col2%3E%3E0&y=2&tmplt=2&hml=KML
If you wish to add a search function or display multiple layers with a Google Fusion Table map, you need to learn how to host code a better way, and I recommend our updated GitHub tutorial at http://epress.trincoll.edu/dataviz/chapter/host-html-github/ If you need help, be sure to ask me or Veronica.
Once again, for future assignments, please create visualizations related to your original topic, using the public data that you’ve already discovered online.