var map = new BMap.Map("allmap");
map.centerAndZoom(new BMap.Point(117.124533, 31.863914), 15);
var polylinePointsArray = [];
var gridView = document.getElementById("GridView1");
for (var i = 0; i <gridView.rows(rowIndex).cells.length; i++) {
for (var j = 0; j < 1; j++) {
var x = gridView.Rows(i).Cells(j).inner.Text;
var y = gridView.Rows(i).Cells(j+1).inner.Text;
polylinePointsArray[i] = new BMap.Point(x, y)
}
}
polyline = new BMap.Polyline(polylinePointsArray, { strokeColor: "red", strokeWeight: 3, strokeOpacity: 0.5 });
map.addOverlay(polyline);
GridView中只有两列横纵坐标,想把坐标存在数组中