Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
1 contributor

Users who have contributed to this file

52 lines (46 sloc) 1.29 KB
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Mapquest example</title>
<style>
#map {
width: 600px;
height: 600px;
}
</style>
<script src="https://api.mqcdn.com/sdk/mapquest-js/v1.3.2/mapquest.js"></script>
<link type="text/css" rel="stylesheet" href="https://api.mqcdn.com/sdk/mapquest-js/v1.3.2/mapquest.css"/>
<script>
var L;
window.onload = function() {
L.mapquest.key = 'YOUR-API-KEY-HERE';
// 'map' refers to a <div> element with the ID map
var map = L.mapquest.map('map', {
center: [53.480759, -2.242631],
// 1. change 'map' to 'hybrid', try other type of map
layers: L.mapquest.tileLayer('hybrid'),
zoom: 12
});
// 2. Add control
map.addControl(L.mapquest.control());
// 3. Add icon
L.marker([53.480759, -2.242631], {
icon: L.mapquest.icons.marker({
primaryColor: '#22407F',
secondaryColor: '#3B5998',
shadow: true,
size: 'md',
symbol: 'A'
})
})
.bindPopup('This is Manchester!')
.addTo(map);
}
</script>
</head>
<body>
<h1>Simple Mapquest example</h1>
<div id="map"></div>
</body>
</html>
You can’t perform that action at this time.