Home > Articles

  • Print
  • + Share This
From the author of

Adding an Info Window

Instead of a simple marker, you may instead want to display a balloon-like info window centered on the location you selected. This info window can display whatever text you specify.

To create an info window, enter the following lines of code directly after the map.setCenter line in the <HEAD> of your document:

map.openInfoWindow(map.getCenter(),
document.createTextNode("YOURTEXT"));

Naturally, you replace YOURTEXT with the text you want to appear in the info window.

  • + Share This
  • 🔖 Save To Your Account