Using jquery with Google maps
Download jQuery 1.4.X or higher or use Googles or Microsofts CDN.
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script> <script type="text/javascript" src="PATH_TO_PLUGIN/jquery.ui.map.js"></script> <script type="text/javascript" src="PATH_TO_PLUGIN/jquery.ui.map.overlays.js"></script>
$('#map_canvas').gmap({ 'center': '37.434538, -121.89970399999999', 'zoom': 10 }).bind('init', function() { $('#map_canvas').gmap('loadFusion', { 'query': { 'from': 297050 } } ); });
// Demonstration of query using older loadFusion version $('#map_canvas').gmap('loadFusion', { query: "SELECT * FROM 297050 WHERE ST_INTERSECTS(Address, CIRCLE(LATLNG(37.434538,-121.89970399999999),20000))"}, 297050);
// Remove the fusion table overlay $('#map_canvas').gmap('get', 'overlays > FusionTablesLayer').setMap(null);
There are many ways of writing this snippet, please refer to the sample code section in the wiki.