API Docs for: 7.2
Show:

MQA.InsetMapControl Class

Extends MQA.Control
Module: MQA

This control adds a small overview map at options.zoom zoom levels up.

Dragging the inset map moves the parent map. Dragging or zooming the parent map updates the inset map.

Previously OverViewMapControl.

Constructor

MQA.InsetMapControl

(
  • [options]
)

Parameters:

  • [options] Object optional

    Will be merged with the default options.

    • [size] Object optional

      Object specifying dimensions in pixels. Defaults to {width: 150, height: 120}.

    • [mapType] String default = 'map'

      Map type. One of 'map', 'hyb', or 'sat'.

    • [zoom] Number default = 3

      Zoom level relative to main map.

    • [minimized] Boolean default = false

      Whether control is minimized.

    • [retainAspectRatio] Boolean default = false

      Whether control should ignore options.size.height to match the parent map's aspect ratio.

    • [maxZoom] Number default = 11

      Maximum zoom level for this control.

    • [slideWhenClicked] Boolean default = false

      Whether to slide to point when the control is clicked.

Properties

controlVersion

String

Inherited from MQA.Control

The version of the control.

Methods

calcAspectRatioHeight

()

calculates the inset map control height based on the parent map height, uses the width set in options.

calcHighlightRect

()

sizes the overview rectangle drawn on the overview map to the size of the main map display area

getHeight

() Number

Inherited from MQA.Control

Determines the height of the control by selecting the greatest height from all elements in the control subtree. Override this method to provide a custom height (in most cases this should be overridden).

Returns <Number>

The height of the control.

getHeightInternal

() private

Inherited from MQA.Control

Get the height of the control.

getMsg

(
  • key
  • defaultMsg
)
String

Inherited from MQA.Control

Provides localization support for controls with text labels.

Parameters:

  • key String

    The unique key for the message.

  • defaultMsg String

    The default message to use if the message isn't found for the localization.

Returns <String>

The localized message.

getPosition

() MQA.CornerPlacement

Inherited from MQA.Control

Returns the position of the control. A default position is set when instantiated.

Returns <MQA.CornerPlacement>

The position of the control.

getWidth

() Number

Inherited from MQA.Control

Determines the width of the control by selecting the greatest width from all elements in the the control subtree. Override this method to provide a custom width (in most cases this should be overridden).

Returns <Number>

The width of the control.

getWidthInternal

(
  • parent
)
Number private

Inherited from MQA.Control

Get the width of the control.

Parameters:

Returns <Number>

width

initialize

(
  • map
)

Inherited from MQA.Control

Initialize a control on the map.

Parameters: