<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Popups</title>
    <link href="https://tiles.locationiq.com/v2/libs/leaflet/1.3.3/leaflet.css" rel="stylesheet" type="text/css"/>
    <style type="text/css">
        body {
            margin: 0;
        }
        #map {
            width: 100vw;
            height: 100vh;
        }
    </style>
</head>
<body>

<div id='map'></div>
<script type="text/javascript" src="https://tiles.locationiq.com/v2/libs/leaflet/1.3.3/leaflet.js"></script>
<script type="text/javascript" src="https://tiles.unwiredmaps.com/js/leaflet-unwired.js"></script>
<script type="text/javascript">
    // Maps access token goes here
    var key = 'pk.a5c3fbf2119bfb2275b62eddbccd76b3';

    // Add layers that we need to the map
    var streets = L.tileLayer.Unwired({key: key, scheme: "streets"});

    // Initialize the map
    var map = L.map('map', {
        center: [39.73, -104.99], // Map loads with this location as center
        zoom: 14,
        scrollWheelZoom: false,
        layers: [streets] // Show 'streets' by default
    });

    // Add the 'scale' control
    L.control.scale().addTo(map);

    // Add the 'layers' control
    L.control.layers({
        "Streets": streets
    }).addTo(map);

    // Add a 'circle' and create a popup
    var circle = L.circle([39.73, -104.997], {
        color: 'red',
        fillColor: '#f03',
        fillOpacity: 0.5,
        radius: 500
    }).addTo(map).bindPopup("I am a circle.");

    // Add a 'polygon' & bind with a popup function
    var polygon = L.polygon([
        [39.726, -104.980],
        [39.734, -104.982],
        [39.739, -104.971]
    ]).addTo(map).bindPopup("I am a polygon.");

    // Add a 'marker'
    var marker = L.marker([39.723, -104.985])
        .addTo(map)
        .bindPopup("<b>Hello world!</b><br>I am a popup.")
        .openPopup();

</script>
</body>
</html>