MapQuest-GL.js

mqgl.Map('map', 'KEY', options.controls.navigation)

A control that adds interactive navigation functionality to the map.

Syntax

var map = new mqgl.Map('map', 'KEY', {
  controls: {
    navigation: {
      enabled: true, 
      type: 'mapquest',
      position: 'topright'
    }
  }
});

Parameters

  • options object

    An object containing any of the following key value options: enabled, type, and position.

    • enabled Boolean optional, defaults to true.

      Determines if this control should be displayed.

    • type String optional, defaults to 'mapquest'

      The type of the control to be added to the map.

      Possible values are 'mapquest' or 'basic'.

    • position String optional, defaults to 'topright'

      The position of the control (one of the map corners).

      Possible values are 'topleft', 'topright', 'bottomleft' or 'bottomright'.

    Example

    controls: {
      navigation: {
        enabled: true,
        type: 'mapquest',
        position: 'topright'
      }
    }

Visual Example