Skip to content

Instantly share code, notes, and snippets.

@PiotrKrosniak
Created January 23, 2014 11:32
Show Gist options
  • Select an option

  • Save PiotrKrosniak/8577124 to your computer and use it in GitHub Desktop.

Select an option

Save PiotrKrosniak/8577124 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title> - jsBin demo</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
</head>
<body>
Fusion Table Column ID: <input id="column_id" value="LOCATION_LAT"><br>
Fusion Table Column ID2: <input id="column_id2" value="LOCATION_LONG"><br>
Fusion Table ID:<input type="text" id="table_id" value="1VDZp-c8O8pkzijYFASAiwuR4r1fTpH52QXHKzag"> <br>
Width:<input type="text" id="width" value="300"> <br>
Height:<input type="text" id="height" value="150"> <br>
<br><br>
<input type="button" id="result" value="result"/>
<iframe id="content" src="about:blank"></iframe>
</body>
</html>
$(window).load(function(){
$("#result").click(function() {
$("#content").attr('src',
'https://www.google.com/fusiontables/embedviz?containerId=googft-gviz-canvas&q=select+'+ $("#column_id").val()+
'%2C'+$("#column_id2").val()+
'+from+' + $("#table_id").val() +
'&viz=GVIZ&t=COLUMN&uiversion=2&gco_forceIFrame=true&gco_hasLabelsColumn=true&width='+ $("#width").val() +
'&height='+ $("#height").val() +
'').attr({width:Number($("#width").val())+50,height:Number($("#height").val())+50});});});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment