
function Circle() {
this.position_ = new GPoint(0, 0);
this.coords_ = new GLatLng(90.0, 0.0);
this.div_ = null;
this.image_ = null;
}
Circle.prototype = new GOverlay();
Circle.prototype.unload = function() {
this.position_ = null;
this.coords_ = null;
this.div_ = null;
this.image_ = null;
this.map_ = null;
}
Circle.prototype.initialize = function(map) {
if(this.div_ == null) {
var div = $Div();
div.style.position = 'absolute';
this.image_ = $Element('img', 'circle');
this.image_.src = '/img/map/position.png';
this.image_.style.width = '70px';
this.image_.style.height = '69px';
div.appendChild(this.image_);
this.div_ = div;
}
map.getPane(G_MAP_MAP_PANE).appendChild(this.div_);
this.map_ = map;
}
Circle.prototype.remove = function() {
this.div_.parentNode.removeChild(this.div_);
}
Circle.prototype.copy = function() {
return new Circle();
}
Circle.prototype.redraw = function(force) {
if(!force)
return;
this.position_ = this.map_.fromLatLngToDivPixel(this.coords_);
this.div_.style.left = (this.position_.x - 35) + 'px'; // Anpassen wenn Icon aendert!
this.div_.style.top = (this.position_.y - 34) + 'px'; // Anpassen wenn Icon aendert!
}
Circle.prototype.setPosition = function(coords) {
if(coords == null)
this.coords_ = new GLatLng(90.0, 0.0);
else
this.coords_ = coords;
this.redraw(true);
}
Circle.prototype.getPosition = function() {
return this.coords_;
}

