[英]How can I parse my geometry field in Google Fusion Tables to zoom to polygon coordinates in Google Maps API V3?
[英]How to know the Geometry coordinates for google Maps
我在Google代碼上找到了以下示例腳本:Google Maps Javascript API V3疊加層-http: //code.google.com/apis/maps/documentation/javascript/overlays.html#Overlays概述
而且我想將此代碼應用於其他國家/地區(法國,西班牙...),但是我不知道在哪里/如何找到此腳本中的Geometry代碼(請參見注釋行)
這是代碼:
var australia = new google.maps.LatLng(-25, 133);
map = new google.maps.Map(document.getElementById('map_canvas'), {
center: australia,
zoom: 4,
mapTypeId: google.maps.MapTypeId.ROADMAP
});
layer = new google.maps.FusionTablesLayer({
query: {
select: 'geometry',
from: '815230' // This one
},
styles: [{
polygonOptions: {
fillColor: "#00FF00",
fillOpacity: 0.3
}
}, {
where: "birds > 300",
polygonOptions: {
fillColor: "#0000FF"
}
}, {
where: "population > 5",
polygonOptions: {
fillOpacity: 1.0
}
}]
});
layer.setMap(map);
附言:我試圖將google.maps.LatLng(-25,133)更改為France Lat&Long,但這僅用於使地圖在該位置居中。
謝謝您的幫助
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.