Google Maps API - get bound extent of Polygon onclick (Fusion table) -


i have fusion table geometries. using google maps api use fusion table in website. able select polygon onclick. possible bound of selected polygon using api?

layerb = new google.maps.fusiontableslayer({     query : {         select : "geometry", : 'fusion_table_id'     },             styleid: 2,             templateid: 2,  });  google.maps.event.addlistener(layerb, "click", function (e) {     var t = new google.maps.latlng(e.row["lat"].value, e.row["lon"].value);     map.setzoom(17);  }); 

code basic, onclick take stored lat/long (centroid of polygon) , zoom.

table contains 3 columns : id, geometry , name.

assiuming layerb polygon, can access bounds in listener by:

layerb.getbounds(); 

if not answer looking post full code.


Comments