代码拉取完成,页面将自动刷新
/**
A map label has a place name, longitude and latitude
*/
public class MapLabels
{
private String placeName;
private double latitude;
private double longitude;
/**
Constructs a map label with place name, logitude and latitude given in decimal degrees
*/
public MapLabels (String name, double aLat, double aLong)
{
// your work here
placeName = name;
latitude = aLat;
longitude = aLong;
}
/**
Constructs a map label with place name, logitude and latitude given in degrees, minutes, seconds
*/
public MapLabels (String name, int degLat, int minLat, double secLat, int degLong, int minLong, double secLong)
{
// your work here
placeName = name;
// decimalDegress = Math.signum(degrees) * (Math.abs(degrees) + minutes/60. + seconds/3600.);
latitude = Math.signum(degLat) * (Math.abs(degLat) + minLat/60. + secLat/3600.);
longitude = Math.signum(degLong) * (Math.abs(degLong) + minLong/60. + secLong/3600.);
}
/**
Gets the string in XML form
@return the string
*/
public String toString()
{
//your work here
// use \" to print a "
String label = "<label name=\""
+ placeName + "\" "+"latitude=\""+latitude+"\" "+"longitude=\""+longitude+"\"/>";
return label;
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。