JSFiddle - React, Tailwind, and code Playground

by mattias_jcb

HTML

<script src="http://moonlite.github.com/Leaflet.MultiTileLayer/scripts/lib/Leaflet/dist/leaflet-src.js"></script>
<link rel="stylesheet" href="http://moonlite.github.com/Leaflet.MultiTileLayer/scripts/lib/Leaflet/dist/leaflet.css">
<div id='amap' style="width:500px;height:500px;"></div>

JavaScript

var map = new L.Map('amap', 
{
    center: new L.LatLng(45.50144, -122.67599),
    zoom: 4,
    minZoom: 1,
    layers: [
        L.tileLayer('http://{s}.tile.cloudmade.com/{key}/997/256/{z}/{x}/{y}.png', {
            maxZoom: 18,
            attribution: 'Map data &copy; 2011 OpenStreetMap contributors, Imagery &copy; 2011 CloudMade',
            key: 'BC9A493B41014CAABB98F0471D759707'
        }),
        L.tileLayer('http://server.arcgisonline.com/ArcGIS/rest/services/Demographics/USA_Average_Household_Size/MapServer/tile/{z}/{y}/{x}', {
            minZoom: 6, maxZoom: 19, attribution: 'Tiles: &copy; Esri'
        })
        
    ]
});
map.on('zoomend load', function(){ console.log(map.getMaxZoom() + ":" + map.getMinZoom()); });
console.log(map.getMaxZoom() + ":" + map.getMinZoom());