function LabeledMarker(d,c){this.latlng_=d;this.opts_=c;this.labelText_=c.labelText||"";this.labelClass_=c.labelClass||"LabeledMarker_markerLabel";this.labelOffset_=c.labelOffset||new GSize(0,0);this.clickable_=c.clickable||true;this.title_=c.title||"";this.labelVisibility_=true;if(c.draggable){c.draggable=false}GMarker.apply(this,arguments)}LabeledMarker.prototype=new GMarker(new GLatLng(0,0));LabeledMarker.prototype.initialize=function(h){GMarker.prototype.initialize.apply(this,arguments);this.map_=h;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_;h.getPane(G_MAP_MARKER_PANE).appendChild(this.div_);if(this.clickable_){function a(d,c){return function(){GEvent.trigger(d,c)}}var g=["click","dblclick","mousedown","mouseup","mouseover","mouseout"];for(var b=0;b<g.length;b++){var f=g[b];GEvent.addDomListener(this.div_,f,a(this,f))}}};LabeledMarker.prototype.redraw=function(b){GMarker.prototype.redraw.apply(this,arguments);var c=this.map_.fromLatLngToDivPixel(this.latlng_);var d=GOverlay.getZIndex(this.latlng_.lat());this.div_.style.left=(c.x+this.labelOffset_.width)+"px";this.div_.style.top=(c.y+this.labelOffset_.height)+"px";this.div_.style.zIndex=d};LabeledMarker.prototype.remove=function(){GEvent.clearInstanceListeners(this.div_);if(this.div_.outerHTML){this.div_.outerHTML=""}if(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.opt_opts_)};LabeledMarker.prototype.show=function(){GMarker.prototype.show.apply(this,arguments);if(this.labelVisibility_){this.showLabel()}else{this.hideLabel()}};LabeledMarker.prototype.hide=function(){GMarker.prototype.hide.apply(this,arguments);this.hideLabel()};LabeledMarker.prototype.setLabelVisibility=function(b){this.labelVisibility_=b;if(!this.isHidden()){if(this.labelVisibility_){this.showLabel()}else{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"};