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 google.maps.Size(0,0);
this.clickable_=C.clickable||true;
this.title_=C.title||"";
this.labelVisibility_=true;
if(C.draggable){C.draggable=false
}google.maps.Marker.apply(this,arguments)
}LabeledMarker.prototype=new google.maps.Marker(new google.maps.LatLng(0,0));
LabeledMarker.prototype.initialize=function(J){google.maps.Marker.prototype.initialize.apply(this,arguments);
this.map_=J;
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_;
J.getPane(G_MAP_MARKER_PANE).appendChild(this.div_);
if(this.clickable_){function H(A,B){return function(C){if(!C){var C=window.event
}C.cancelBubble=true;
if(C.stopPropagation){C.stopPropagation()
}google.maps.Event.trigger(A,B)
}
}var I=["click","dblclick","mousedown","mouseup","mouseover","mouseout"];
for(var F=0;
F<I.length;
F++){var G=I[F];
google.maps.Event.addDomListener(this.div_,G,H(this,G))
}}};
LabeledMarker.prototype.redraw=function(B){google.maps.Marker.prototype.redraw.apply(this,arguments);
this.redrawLabel_()
};
LabeledMarker.prototype.redrawLabel_=function(){var C=this.map_.fromLatLngToDivPixel(this.latlng_);
var D=google.maps.Overlay.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(){google.maps.Event.clearInstanceListeners(this.div_);
if(this.div_.outerHTML){this.div_.outerHTML=""
}if(this.div_.parentNode){this.div_.parentNode.removeChild(this.div_)
}this.div_=null;
google.maps.Marker.prototype.remove.apply(this,arguments)
};
LabeledMarker.prototype.copy=function(){return new LabeledMarker(this.latlng_,this.opts_)
};
LabeledMarker.prototype.show=function(){google.maps.Marker.prototype.show.apply(this,arguments);
if(this.labelVisibility_){this.showLabel()
}else{this.hideLabel()
}};
LabeledMarker.prototype.hide=function(){google.maps.Marker.prototype.hide.apply(this,arguments);
this.hideLabel()
};
LabeledMarker.prototype.setLatLng=function(B){this.latlng_=B;
google.maps.Marker.prototype.setLatLng.apply(this,arguments);
this.redrawLabel_()
};
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"
};