Hi, I’m learning this part: Extending the Mapquest example
Below is my code, but it doesn’t work on my Google Cloud.
<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>
// 1. The basic part of the example
var L;
window.onload = function() {
L.mapquest.key = 'rOOoTYOyk6jq7VyQkvuoHCXhV1Ac3iPh';
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);
map.addControl(L.mapquest.control());
// 'map' refers to a <div> element with the ID map
var map = L.mapquest.map('map', {
center: [53.480759, -2.242631],
layers: L.mapquest.tileLayer('hybrid'),
zoom: 12
});
}
</script>
</head>
<body>
<h1>Simple Mapquest example</h1>
<div id="map"></div>
</body>
</html>
This is Chrome browser screenshot