I'm wondering if it's possible to access the latlng values that are returned from the query below. The query itself works fine, but for what I'm building I would need to know the center location of a country.
I know how to find the center latlng based on a collection of latlng values, but I just can't find a way how to access the returned latlng values from the fusion table query.
Not sure if that is even possible? I tried to do console.log(layer) and see if I could find an array or so with the returned latlng values, but unless I'm missing something it's not there.
If what I want is possible, how would I access the those values? Or any other suggestion on how to access the latng values for the polygons?
var layer = new google.maps.FusionTablesLayer({
query: {
select: 'geometry',
from: '17mMrmy5DaEPNlPabZeKrTmY3e8cP7-qCFrrFyxk',
where: "iso_a3 IN ('AFG', 'NZL')"
},
styles: [{
polygonOptions: {
fillColor: '#ff22ff',
fillOpacity: 0.3
}
}]
});
layer.setMap(map);
You can't access the information from the FusionTableLayer except on a click event.
Click on the polygons in this map you will see the coordinates in the infowindow.
You can query the FusionTable using GViz or the FusionTables API v1.0 to get the information required.