我想把谷歌地图显示分成 200 个部分,我有这个代码
bounds = map.getBounds();
southWest = bounds.getSouthWest();
northEast = bounds.getNorthEast();
tileWidth = (northEast.lng() - southWest.lng()) / 10;
tileHeight = (northEast.lat() - southWest.lat()) / 20;
for (x=0; x < 20 ; x++)
{
for (y=0; y < 10 ; y++)
{
var x1 = southWest.lat()+ (tileHeight * x);
var y1 = southWest.lng()+ (tileWidth * y);
var x2 = x1 + tileHeight;
var y2 = y1 + tileWidth;
var tempCell = new GLatLngBounds(new GLatLng(x1, y1), new GLatLng(x2, y2));
}
}
我只是想不通它有什么问题......有什么想法吗?