javascript 创建对象

function Point(lng,lat)
{
this.x = lng;
this.y = lat;
}

var Spoint = new Point("166.85462145","98.65478985241");
var Epoint = new Point("166.85462145","98.65478985241");

var lineLngLat = new Array();
lineLngLat[0] = Spoint;
lineLngLat[1] = Epoint;

你可能感兴趣的:(JavaScript)