Chloropleth with zoom level
Layers not showing up
HTML
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title>Update a choropleth layer by zoom level</title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v0.44.1/mapbox-gl.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.44.1/mapbox-gl.css' rel='stylesheet' />
<style>
body { margin:0; padding:0; }
#map { position:absolute; top:0; bottom:0; width:100%; }
</style>
</head>
<body>
<style>
.legend {
background-color: #fff;
border-radius: 3px;
bottom: 30px;
box-shadow: 0 1px 2px rgba(0,0,0,0.10);
font: 12px/20px 'Helvetica Neue', Arial, Helvetica, sans-serif;
padding: 10px;
position: absolute;
right: 10px;
z-index: 1;
}
.legend h4 {
margin: 0 0 10px;
}
.legend div span {
border-radius: 50%;
display: inline-block;
height: 10px;
margin-right: 5px;
width: 10px;
}
</style>
<div id='map'></div>
<div id='zoneveg-legend' class='legend' style='display: none;'>
<h4>Zone de végétation</h4>
<div><span style='background-color: #B8B2B2'></span>Zone arctique</div>
<div><span style='background-color: #539140'></span>Zone boréale</div>
<div><span style='background-color: #7FDA10'></span>Zone tempérée nordique</div>
</div>
<div id='dombio-legend' class='legend' style='display: none;'>
<h4>Domaine bioclimatique</h4>
<div><span style='background-color: #C3C4C1'></span>Toundra arctique herbacée</div>
<div><span style='background-color: #696C6C'></span>Toundra arctique arbustive</div>
<div><span style='background-color: #9A7BA1'></span>Toundra forestière</div>
<div><span style='background-color: #C48D99'></span>Pessière à lichens</div>
<div><span style='background-color: #A9ACCA'></span>Pessière à mousses</div>
<div><span style='background-color: #6895BC'></span>Sapinière à bouleau blanc</div>
<div><span...