0
我曾與開放層與下面的功能 -中心多邊形打開圖層 - OSM API
function centerIn(longitude,latitude){
lonlat = new OpenLayers.LonLat(longitude, latitude).transform(
new OpenLayers.Projection("EPSG:4326"), // transform from WGS 1984
new OpenLayers.Projection("EPSG:900913") // to Spherical Mercator Projection
);
map.setCenter(new OpenLayers.LonLat(lonlat.lon, lonlat.lat), 10);
map.zoomTo(theZoom);
}
centerIn(0.99689177607425,44.1216337491133)爲中心的多邊形嘗試;
我的多邊形邊界是 - 1.18915251826175,44.069361365345 1.12048796748053,43.941939265001 1.45900420283204,43.9394671408999
在執行它指向polygon.Not的邊緣polygon.Could人的中心建議我一些解決方案解決此問題。
感謝您的建議。它非常有幫助。 – Hrithik