Class InfoWindowOptions

java.lang.Object
com.dlsc.gmapsfx.javascript.JavascriptObject
com.dlsc.gmapsfx.javascript.object.InfoWindowOptions

public class InfoWindowOptions
extends JavascriptObject
Options for setting an InfoWindow on a Map. This class corresponds to google.maps.InfoWindowOptions" in the Google Maps JavaScript API.
Author:
Rob Terpilowski
  • Constructor Details

  • Method Details

    • content

      public InfoWindowOptions content​(String content)
      Content to display in the InfoWindow. This can be an HTML element, a plain-text string, or a string containing HTML. The InfoWindow will be sized according to the content.
      Parameters:
      content -
      Returns:
      this instance of the InfoWindowOptions
    • disableAutoPan

      public InfoWindowOptions disableAutoPan​(boolean disabled)
      Disable auto-pan on open. By default, the info window will pan the map so that it is fully visible when it opens.
      Parameters:
      disabled - true if it should be disabled
      Returns:
      this instance of the InfoWindowOptions
    • maxWidth

      public InfoWindowOptions maxWidth​(int width)
      Maximum width of the infowindow, regardless of content's width. This value is only considered if it is set before a call to open. To change the maximum width when changing content, call close, setOptions, and then open.
      Parameters:
      width - The max width
      Returns:
      this instance of the InfoWindowOptions
    • pixelOffset

      public InfoWindowOptions pixelOffset​(Size size)
      The offset, in pixels, of the tip of the info window from the point on the map at whose geographical coordinates the info window is anchored. If an InfoWindow is opened with an anchor, the pixelOffset will be calculated from the anchor's anchorPoint property.
      Parameters:
      size - The offset in pixels.
      Returns:
      this instance of the InfoWindowOptions
    • position

      public InfoWindowOptions position​(LatLong latlong)
      The LatLng at which to display this InfoWindow. If the InfoWindow is opened with an anchor, the anchor's position will be used instead.
      Parameters:
      latlong - The position of the window
      Returns:
      this instance of the InfoWindowOptions
    • zIndex

      public InfoWindowOptions zIndex​(int index)
      All InfoWindows are displayed on the map in order of their zIndex, with higher values displaying in front of InfoWindows with lower values. By default, InfoWindows are displayed according to their latitude, with InfoWindows of lower latitudes appearing in front of InfoWindows at higher latitudes. InfoWindows are always displayed in front of markers.
      Parameters:
      index - The index to set this window to
      Returns:
      this instance of the InfoWindowOptions