Contents

new LookAroundPreview(parent, location, options)

Creates a Look Around preview you embed on a webpage and initializes it with the constructor options you choose.

Declaration

constructor(
        parent?: HTMLElement,
        location?: Coordinate | Place | LookAroundScene,
        options?: LookAroundPreviewOptions,
    );

Parameters

  • parent:

    A DOM element, or the ID of a DOM element, to use as your view’s container.

  • location:

    A Coordinate that describes the location the preview shows.

  • options:

    Options that Lookaroundpreviewoptions defines for initializing the properties of the preview.

Return Value

A LookAroundPreview instance.

Discussion

The Look Around preview’s constructor takes an optional parent argument and an optional options argument. If you specify the parent argument, MapKit JS inserts the preview element into the DOM as a descendant of parent.