You are viewing an older version of MapQuest.js. Check out the latest version.
A multi-button control that pans the map up, down, left and right. It also resets the map to its default zoom and center point when the center button is clicked. The control position, pan distance, and control title are customizable.
L.mapquest.key = 'KEY';
var map = L.mapquest.map('map', {
center: [39.7392,-104.9903],
layers: L.mapquest.tileLayer('map'),
zoom: 12
});
map.addControl(L.mapquest.navigationControl());
An object containing any of the following key value options: position, panDistance, and title.
The position of the control (one of the map corners).
Possible values are 'topleft', 'topright', 'bottomleft' or 'bottomright'.
When the control is clicked, pans the map by a given number of pixels (animated) in clicked direction.
Text for the browser tooltip that appear on control hover.
{
position: 'topright',
panDistance: 100,
title: 'Navigation'
}
An L.Control object that can be added to a map with the addControl() function.