xxxxxxxxxx
<html>
<head>
<title>Leaflet Quick Start Guide Example</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://cdn.leafletjs.com/leaflet-0.5.1/leaflet.css" />
<!--[if lte IE 8]><link rel="stylesheet" href="../dist/leaflet.ie.css" /><![endif]-->
</head>
<body>
<div id="map" style="width: 960px; height: 500px"></div>
<script src="isArray-polyfill.js"></script>
<script src="array.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.5.1/leaflet.min.js"></script>
<script>
var centerPoint = array(51.505, -0.09);
var circleCenter = array(51.508, -0.11);
var polygonPoints = array(
array(51.509, -0.08),
array(51.503, -0.06),
array(51.51, -0.047)
);
var map = L.map('map').setView(centerPoint, 13);
L.tileLayer('https://{s}.tile.cloudmade.com/BC9A493B41014CAABB98F0471D759707/997/256/{z}/{x}/{y}.png', {
maxZoom: 18,
attribution: 'Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="https://cloudmade.com">CloudMade</a>'
}).addTo(map);
L.marker(centerPoint).addTo(map)
.bindPopup("<b>Hello world!</b><br />I am a popup.").openPopup();
L.circle(circleCenter, 500, {
color: 'red',
fillColor: '#f03',
fillOpacity: 0.5
}).addTo(map).bindPopup("I am a circle.");
L.polygon(polygonPoints).addTo(map).bindPopup("I am a polygon.");
var popup = L.popup();
function onMapClick(e) {
popup
.setLatLng(e.latlng)
.setContent("You clicked the map at " + e.latlng.toString())
.openOn(map);
}
map.on('click', onMapClick);
</script>
</body>
</html>
Modified http://cdn.leafletjs.com/leaflet-0.5.1/leaflet.js to a secure url
https://cdn.leafletjs.com/leaflet-0.5.1/leaflet.js