HtmlInfoWindow class

July 15, 2019 ยท View on GitHub

let htmlInfoWindow = new HtmlInfoWindow();

let frame: HTMLElement = document.createElement('div');
frame.innerHTML = [
  '<h3>Hearst Castle</h3>',
  '<img src="assets/imgs/hearst_castle.jpg">'
].join("");
frame.getElementsByTagName("img")[0].addEventListener("click", () => {
  htmlInfoWindow.setBackgroundColor('red');
});
htmlInfoWindow.setContent(frame, {
  width: "280px",
  height: "330px"
});

htmlInfoWindow.open(marker);

API Reference


new HtmlInfoWindow()

Params Type Details

Instance method