Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Updated addMarker, based on feedback from users

...

  • displayElementId (string) - The id of your div. This div will end up with a child iframe element where our imagery will display.

  • mapClass (object) - The css class that will be added to the generated iframe.

  • sphereData (object) - Sphere data with which to initialize the iframe. sphereData can have these properties:

    • title (string): A title for the sphere

    • sphere_lat (number): The latitude of the sphere to display

    • sphere_lng(number): The longitude of the sphere to display

    • lookat_lat(number): The latitude the camera should look at

    • lookat_lng(number): The longitude the camera should look at

    • camera_fov(number): Camera field of view angle

    • camera_fovmin(number): Minimum field of view angle

    • camera_fovmax(number): Maximum field of view angle

    • panoMarkerDistance (number): The distance, in meters, for which panorama markers are displayed

    • panoMarkerList (Array<number>): The list of specific panorama markers to display, by panorama id

    • layers (array): An array of layer objects, one for each layer you want to display. Each layer object can have these properties:

      • name (string): A name for the layer. Each layer name should be unique.

      • visible (bool): Set this to true for the layer to show (defaults false).

      • markers (array): An array of marker objects to display on the layer. Each marker object can have these properties:

        • name (string): A name for the marker which will be displayed on the sphere. This can contain HTML. Any HTML will be sanitized.

        • id (number | string): An id for the marker. Each marker id must be unique. If this value is falsy, a uuid will be assigned as the id for this marker.

        • lat (number): The latitude at which to display the marker. Note: Cannot be a string.

        • lng (number): The longitude at which to display the marker. Note: Cannot be a string.

        • icon (string): The name of the icon to display for the marker. If the name is one of the default icon names, the marker icon will change as indicated. See list of all available icons here.

        • If more than one marker exists, the sphere will automatically rotate its point of view to accommodate.

    • fontFamilies (string): The string pulled from google fonts in order to allow custom fonts. Note: Only works when done during API initialization.

      • Example(highlighted text):

        • <link href="https://fonts.googleapis.com/css2?family=Comic+Neue:wght@300&family=DotGothic16&family=Stick&family=Syne+Mono&display=swap" rel="stylesheet">

    • apiUIOptions (string): The UI widgets that are displayed in the viewer.

      • Each option can be set to true or false. All are optional and assumed to be true if they are not specified.

        • fullScreen: Set this to false to hide the widget.

        • snapshot: Set this to false to hide the widget.

        • help: Set this to false to hide the widget.

        • info: Set this to false to hide the widget.

        • view_toggle: Set this to false to hide the widget.

        • navigation: Set this to false to hide the widget.

...

Adds a marker to the sphere, either at a specified latitude and longitude, or at the specified address.

Parameters:

  • *lat (number): The latitude at which to place this marker (required unless address is passed)

  • *lng (number): The longitude at which to place this marker (required unless address is passed)

  • address (string): The street address at which to place this marker. When using this, lat and lng can be empty.

  • title (string): The title for this marker, which will be displayed within the marker popup

  • description (string): A description for the marker, which will be displayed within the marker popup. This can contain HTML. When both title and description are passed, the description shows up below the title, and the title stands out more.

  • icon (string): The name of the icon for this marker (see the list of icon names in the constructor above)

  • layer (string): The name of the layer to which to add this markerWhen passed, the marker will be added to the named layer

  • id (number | string): An id for this marker. This value must be unique. If this value is falsy, a uuid will be assigned as the id for this marker.

  • hoverText (string): The string that should be displayed on hovering the marker. This is only meant to contain a string of text.

  • metaData (object)

  • callback (function): A function to execute after adding the marker. Takes a single parameter, result, which contains the added marker object.

...