function LabeledMarker(a,b){this.latlng_=a;this.opts_=b;this.labelText_=b.labelText||"";this.labelClass_=b.labelClass||"LabeledMarker_markerLabel";this.labelOffset_=b.labelOffset||new GSize(0,0);this.clickable_=b.clickable||true;this.title_=b.title||"";this.labelVisibility_=true;if(b.draggable)b.draggable=false;GMarker.apply(this,arguments)}LabeledMarker.prototype=new GMarker(new GLatLng(0,0));
LabeledMarker.prototype.initialize=function(a){GMarker.prototype.initialize.apply(this,arguments);this.map_=a;this.div_=document.createElement("div");this.div_.className=this.labelClass_;this.div_.innerHTML=this.labelText_;this.div_.style.position="absolute";this.div_.style.cursor="pointer";this.div_.title=this.title_;a.getPane(G_MAP_MARKER_PANE).appendChild(this.div_);if(this.clickable_)for(var b=function(a,b){return function(){GEvent.trigger(a,b)}},d="click,dblclick,mousedown,mouseup,mouseover,mouseout".split(","),
c=0;c<d.length;c++){var e=d[c];GEvent.addDomListener(this.div_,e,b(this,e))}};LabeledMarker.prototype.redraw=function(a){GMarker.prototype.redraw.apply(this,arguments);this.redrawLabel_()};LabeledMarker.prototype.redrawLabel_=function(){var a=this.map_.fromLatLngToDivPixel(this.latlng_),b=GOverlay.getZIndex(this.latlng_.lat());this.div_.style.left=a.x+this.labelOffset_.width+"px";this.div_.style.top=a.y+this.labelOffset_.height+"px";this.div_.style.zIndex=b};
LabeledMarker.prototype.remove=function(){GEvent.clearInstanceListeners(this.div_);if(this.div_.outerHTML)this.div_.outerHTML="";this.div_.parentNode&&this.div_.parentNode.removeChild(this.div_);this.div_=null;GMarker.prototype.remove.apply(this,arguments)};LabeledMarker.prototype.copy=function(){return new LabeledMarker(this.latlng_,this.opts_)};LabeledMarker.prototype.show=function(){GMarker.prototype.show.apply(this,arguments);this.labelVisibility_?this.showLabel():this.hideLabel()};
LabeledMarker.prototype.hide=function(){GMarker.prototype.hide.apply(this,arguments);this.hideLabel()};LabeledMarker.prototype.setLatLng=function(a){this.latlng_=a;GMarker.prototype.setLatLng.apply(this,arguments);this.redrawLabel_()};LabeledMarker.prototype.setLabelVisibility=function(a){this.labelVisibility_=a;this.isHidden()||(this.labelVisibility_?this.showLabel():this.hideLabel())};LabeledMarker.prototype.getLabelVisibility=function(){return this.labelVisibility_};
LabeledMarker.prototype.hideLabel=function(){this.div_.style.visibility="hidden"};LabeledMarker.prototype.showLabel=function(){this.div_.style.visibility="visible"};

