...= function() {
this.bear = bearing(this.cent.lat,this.cent.lon, this.rad.lat, this.rad.lon);
this.dist = distance(this.cent.lat,this.cent.lon, this.rad.lat, this.rad.lon);
document.getElementById('rad').innerHTML = this.dist.toPrecision(6).toString()+' km';
document.getElementById('bear').innerHTML = this.bear.toDeg().toPrecision(5).toString()+' deg';
}
Polygon.prototype.setRad = function() {
var latlon = destination(this.cent.lat,this.cent.lon, this.dist,this.bear);
this.rad.setLoc (latlon[0],latlon[1]);
}
Polygon.prototype.colour = function(col) {
this.lineStyle.getColor().set(col);
}
Polygon.prototype.drawPolygon = function() { // Draw our Polygon
var latlon;
this.lineString.getCoordinates().clear();
for (i=0; i <=this.numsides; i++) {
latlon = destination(this.cent.lat,this.cent.lon,this.dist,this.bear+i*2*pi/this.numsides);
this.lineString.getCoordinates().pushLatLngAlt(latlon[0],latlon[1],0);
}
this.areaCircum();
}
function PM(lat,lon,name,colour) { // Create Placemark
var me = this;
me.active = false;
me.name = name;
me.placemark = ge.createPlacemark...
Leer más ...