MapQuest.js
L.mapquest.satelliteControl(options)
A single button control that toggles between the base layer and a hybrid satellite road layer. The position, mapType, css class, and control title are customizable.
Syntax
js
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.satelliteControl());
Parameters
Options Object
An object containing any of the following key value options: position, mapType, title, and className.
Request Parameter | Description | Required |
---|---|---|
position String | The position of the control (one of the map corners). Possible values are 'topleft', 'topright', 'bottomleft' or 'bottomright'. | No, defaults to 'topright' |
mapType String | The id of a map style. The supported style ids are 'map', 'hybrid', 'satellite', 'light', 'dark'. | No, defaults to 'hybrid' |
title String | Text for the browser tooltip that appear on control hover. | No, defaults to 'Satellite' |
className String | A custom CSS class name to assign to the control. | No |
Example
js
{
position: 'topright',
mapType: 'hybrid',
title: 'Satellite',
className: ''
}
Return Value
An L.Control object that can be added to a map with the addControl() function.