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.
position: The position of the control (one of the map corners). Possible values are 'topleft', 'topright', 'bottomleft' or 'bottomright'. Default is 'topright'.
panDistance: When the control is clicked, pans the map by a given number of pixels (animated) in clicked direction. Default is 100
title: Text for the browser tooltip that appear on control hover. Default is 'Navigation'
{
position: 'topright',
panDistance: 100,
title: 'Navigation'
}
An L.Control object that can be added to a map with the addControl() function.