mirror of
https://github.com/Leaflet/Leaflet.git
synced 2025-08-03 15:40:43 +00:00

* Add Ukraini dialog * Fix lint * Make it more keyboard-user friendly * Change close element to button and add dialog as first element
23 lines
745 B
Markdown
23 lines
745 B
Markdown
---
|
|
layout: tutorial_frame
|
|
title: Choropleth Tutorial
|
|
---
|
|
<script type="text/javascript" src="us-states.js"></script>
|
|
<script type="text/javascript">
|
|
|
|
var map = L.map('map').setView([37.8, -96], 4);
|
|
|
|
var tiles = L.tileLayer('https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw', {
|
|
maxZoom: 18,
|
|
attribution: 'Map data © <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, ' +
|
|
'Imagery © <a href="https://www.mapbox.com/">Mapbox</a>',
|
|
id: 'mapbox/light-v9',
|
|
tileSize: 512,
|
|
zoomOffset: -1
|
|
}).addTo(map);
|
|
|
|
/* global statesData */
|
|
var geojson = L.geoJson(statesData).addTo(map);
|
|
|
|
</script>
|