//Constructor
var JRoutePoint=function()
{
	//Field
	this.xDegree=0;
	this.xMinute=0;
	this.xSecond=0;
	this.yDegree=0;
	this.yMinute=0;
	this.ySecond=0;
	this.xMSecond=0;
	this.yMSecond=0;
	this.annoText="";
	this.legendName="±κΗ©";
	this.legendImg="biaoqian";
	this.color="#ffffff";
	this.radius=1;
	this.description="";
	this.height=0;
	
	this.toXString=JRoutePoint_toXString;
	this.toYString=JRoutePoint_toYString;
	this.fromString=JRoutePoint_fromString;
	this.getX=JRoutePoint_getX;
	this.getY=JRoutePoint_getY;
}

function JRoutePoint_toXString()
{
	var xCoord=this.xDegree.toString()+"."+
		this.xMinute.toString()+"."+
		this.xSecond.toString()+"."+
		this.xMSecond.toString();
		
	return xCoord;
}

function JRoutePoint_toYString()
{
	var yCoord=this.yDegree.toString()+"."+
		this.yMinute.toString()+"."+
		this.ySecond.toString()+"."+
		this.yMSecond.toString();
		
	return yCoord;
}

function JRoutePoint_fromString(xCoord, yCoord)
{
	var xCoords=xCoord.split(".");

	this.xDegree=parseInt(xCoords[0]);
	this.xMinute=parseInt(xCoords[1]);
	this.xSecond=parseInt(xCoords[2]);
	if(xCoords.length>3)
		this.xMSecond=parseInt(xCoords[3]);
		
	var yCoords=yCoord.split(".");

	this.yDegree=parseInt(yCoords[0]);
	this.yMinute=parseInt(yCoords[1]);
	this.ySecond=parseInt(yCoords[2]);
	if(yCoords.length>3)
		this.yMSecond=parseInt(yCoords[3]);
}

function JRoutePoint_getX()
{
	return degreeFromDMSHigh(this.xDegree, this.xMinute, this.xSecond, this.xMSecond);
}

function JRoutePoint_getY()
{
	return degreeFromDMSHigh(this.yDegree, this.yMinute, this.ySecond, this.yMSecond);
}
