index.js
function MarkerLabel_(marker, crossURL, handCursorURL) {
    this.marker_ = marker;
    this.handCursorURL_ = marker.handCursorURL;

    this.labelDiv_ = document.createElement("div");
    this.labelDiv_.style.cssText = "position: absolute; overflow: hidden;";

    // Set up the DIV for handling mouse events in the label. This DIV forms a transparent veil
    // in the "overlayMouseTarget" pane, a veil that covers just the label. This is done so that
    // events can be captured even if the label is in the shadow of a google.maps.InfoWindow.
    // Code is included here to ensure the veil is always exactly the same size as the label.
    this.eventDiv_ = document.createElement("div");
    this.eventDiv_.style.cssText = this.labelDiv_.style.cssText;

    // This is needed for proper behavior on MSIE:
    this.eventDiv_.addEventListener('selectstart', function() { return false; });
    this.eventDiv_.addEventListener('dragstart', function() { return false; });

    // Get the DIV for the "X" to be displayed when the marker is raised.
    this.crossDiv_ = MarkerLabel_.getSharedCross(crossURL);
  }
function MarkerLabel_(marker, crossURL, handCursorURL) {
    this.marker_ = marker;
    this.handCursorURL_ = marker.handCursorURL;

    this.labelDiv_ = document.createElement("div");
    this.labelDiv_.style.cssText = "position: absolute; overflow: hidden;";

    // Set up the DIV for handling mouse events in the label. This DIV forms a transparent veil
    // in the "overlayMouseTarget" pane, a veil that covers just the label. This is done so that
    // events can be captured even if the label is in the shadow of a google.maps.InfoWindow.
    // Code is included here to ensure the veil is always exactly the same size as the label.
    this.eventDiv_ = document.createElement("div");
    this.eventDiv_.style.cssText = this.labelDiv_.style.cssText;

    // This is needed for proper behavior on MSIE:
    this.eventDiv_.addEventListener('selectstart', function() { return false; });
    this.eventDiv_.addEventListener('dragstart', function() { return false; });

    // Get the DIV for the "X" to be displayed when the marker is raised.
    this.crossDiv_ = MarkerLabel_.getSharedCross(crossURL);
  }
function MarkerLabel_ ( marker , crossURL , handCursorURL ) { this . marker_ = marker ; this . handCursorURL_ = marker . handCursorURL ; this . labelDiv_ = document . createElement ( "div" ) ; this . labelDiv_ . style . cssText = "position: absolute; overflow: hidden;" ; // Set up the DIV for handling mouse events in the label. This DIV forms a transparent veil // in the "overlayMouseTarget" pane, a veil that covers just the label. This is done so that // events can be captured even if the label is in the shadow of a google.maps.InfoWindow. // Code is included here to ensure the veil is always exactly the same size as the label. this . eventDiv_ = document . createElement ( "div" ) ; this . eventDiv_ . style . cssText = this . labelDiv_ . style . cssText ; // This is needed for proper behavior on MSIE: this . eventDiv_ . addEventListener ( 'selectstart' , function ( ) { return false ; } ) ; this . eventDiv_ . addEventListener ( 'dragstart' , function ( ) { return false ; } ) ; // Get the DIV for the "X" to be displayed when the marker is raised. this . crossDiv_ = MarkerLabel_ . getSharedCross ( crossURL ) ; }
This constructor creates a label and associates it with a marker.
It is for the private use of the MarkerWithLabel class.
@constructor
@param {Marker} marker The marker with which the label is to be associated.
@param {string} crossURL The URL of the cross image =.
@param {string} handCursor The URL of the hand cursor.
@private
This constructor creates a label and associates it with a marker . It is for the private use of the MarkerWithLabel class .