API Docs for: 2.2
Show:

MQ Class

Methods

darkLayer

(
  • options
)
MQ.TileLayer

Factory method for MQ.TileLayer Automatically sets options.mapType to "dark" and sets options.key.

Parameters:

Returns <MQ.TileLayer>

geocode

(
  • [options]
)
MQ.Geocode

This is a helper function which returns a new MQ.Geocode and initializes it with the key used to fetch the plugins.

 var map = L.map('map', {
     layers: MQ.mapLayer()
 });

 MQ.geocode().search('san francisco ca')
     .on('success', function(e) {
         var best = e.result.best,
             latlng = best.latlng;

         map.setView(latlng, 12);

         L.marker([ latlng.lat, latlng.lng ])
             .addTo(map)
             .bindPopup('<strong>' + best.adminArea5 + ', ' + best.adminArea3 + '</strong><br />is located here.')
             .openPopup()
         });

Parameters:

  • [options] Object optional
    • [key] optional

      API key

Returns <MQ.Geocode>

hybridLayer

(
  • options
)
MQ.TileLayer

Factory method for MQ.TileLayer Automatically sets options.mapType to "hyb" and sets options.key.

Parameters:

Returns <MQ.TileLayer>

lightLayer

(
  • options
)
MQ.TileLayer

Factory method for MQ.TileLayer Automatically sets options.mapType to "light" and sets options.key.

Parameters:

Returns <MQ.TileLayer>

mapLayer

(
  • options
)
MQ.TileLayer

Factory method for MQ.TileLayer Automatically sets options.mapType to "map" and sets options.key.

Parameters:

Returns <MQ.TileLayer>

satelliteLayer

(
  • options
)
MQ.TileLayer

Factory method for MQ.TileLayer Automatically sets options.mapType to "sat" and sets options.key.

Parameters:

Returns <MQ.TileLayer>

tileLayer

(
  • options
)
MQ.TileLayer

Factory method for MQ.TileLayer. Automatically sets options.key.

Parameters:

Returns <MQ.TileLayer>

traffic.flow

(
  • options
)
MQ.Traffic.Flow

Factory method for creating a new instance of MQ.Traffic.Flow

Parameters:

Returns <MQ.Traffic.Flow>

traffic.incidents

(
  • options
)
MQ.Traffic.Incidents

Factory method for MQ.Traffic.Incidents

Parameters:

traffic.markets

(
  • options
)
MQ.Traffic.Markets

Factory method for MQ.Traffic.Markets

Parameters:

Returns <MQ.Traffic.Markets>

trafficLayer

(
  • [options]
)

Creates a layer group consisting of the traffic layers which can then be added to a map.

Parameters:

  • [options] Object optional
    • [key] String optional
    • [layers] defaults to `['incidents','flow','markets'] Array optional

      `

Returns

L.LayerGroup