onAdd() {

		const div = document.createElement('div');
		div.style.borderStyle = 'none';
		div.style.borderWidth = '0px';
		div.style.position = 'absolute';
		div.style.transform = 'translate(-50%, 0)';

		// Create the img element and attach it to the div.
		const textElement = document.createElement('div');
		textElement.textContent = this.text_;
		textElement.style.transform = `rotate(${this.rotation_}deg)`;
		textElement.style.transformOrigin = "50% 50%";
		textElement.style.whiteSpace = 'nowrap';
		for (let [key, value] of Object.entries(this.customStyles_)) {
			textElement.style[key] = value;
		}
		this.textElement = textElement;
		div.appendChild(textElement);
		this.div_ = div;

		// Add the element to the "overlayLayer" pane.
		const panes = this.getPanes();
		panes.overlayLayer.appendChild(div);
	}
/**
	 * onAdd is called when the map's panes are ready and the overlay has been
	 * added to the map.
	 */
onAdd is called when the map's panes are ready and the overlay has been
added to the map.
onAdd is called when the map ' s panes are ready and the overlay has been added to the map .
onAdd() {
		const div = document.createElement('div');
		div.style.borderStyle = 'none';
		div.style.borderWidth = '0px';
		div.style.position = 'absolute';
		div.style.transform = 'translate(-50%, 0)';
		const textElement = document.createElement('div');
		textElement.textContent = this.text_;
		textElement.style.transform = `rotate(${this.rotation_}deg)`;
		textElement.style.transformOrigin = "50% 50%";
		textElement.style.whiteSpace = 'nowrap';
		for (let [key, value] of Object.entries(this.customStyles_)) {
			textElement.style[key] = value;
		}
		this.textElement = textElement;
		div.appendChild(textElement);
		this.div_ = div;
		const panes = this.getPanes();
		panes.overlayLayer.appendChild(div);
	}
onAdd ( ) { const div = document . createElement ( 'div' ) ; div . style . borderStyle = 'none' ; div . style . borderWidth = '0px' ; div . style . position = 'absolute' ; div . style . transform = 'translate(-50%, 0)' ; const textElement = document . createElement ( 'div' ) ; textElement . textContent = this . text_ ; textElement . style . transform = ` ${ this . rotation_ } ` ; textElement . style . transformOrigin = "50% 50%" ; textElement . style . whiteSpace = 'nowrap' ; for ( let [ key , value ] of Object . entries ( this . customStyles_ ) ) { textElement . style [ key ] = value ; } this . textElement = textElement ; div . appendChild ( textElement ) ; this . div_ = div ; const panes = this . getPanes ( ) ; panes . overlayLayer . appendChild ( div ) ; }
onAdd is called when the map's panes are ready and the overlay has been
 added to the map.
onAdd is called when the map ' s panes are ready and the overlay has been added to the map .
// Create the img element and attach it to the div. // Add the element to the "overlayLayer" pane.