Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div id="map1"></div>
- ...var map = L.map('map1').setView([37.8, -96], 4);...
- <div id="map2"></div>
- ...var map = L.map('map2').setView([37.8, -96], 4);...
- <div id="map3"></div>
- ...var map = L.map('map3').setView([37.8, -96], 4);...
- var info = L.control();
- info.onAdd = function (map) {
- this._div = L.DomUtil.create('div', 'info'); // create a div with a class "info"
- this.update();
- return this._div;
- };
- // method that we will use to update the control based on feature properties passed
- info.update = function (props) {
- this._div.innerHTML = '<h4>US Population Density</h4>' + (props ?
- '<b>' + props.name + '</b><br />' + props.density + ' people / mi<sup>2</sup>'
- : 'Hover over a state');
- };
- info.addTo(map);
- var map = L.map('map1');
- var map = L.map('map2');
- var map = L.map('map3');
- <!-- Just sheets of paper we can draw on, nothing more -->
- <div id="weather"></div>
- <div id="population"></div>
- <div id="healthcare"></div>
- // Stop eating the crayons
- var map = L.map('weather');
- var map = L.map('population');
- var map = L.map('healthcare');
- var weatherMap = L.map('weather');
- var populationMap = L.map('population');
- var healthcareMap - L.map('healthcare');
- var maps = [
- L.map('weather'),
- L.map('population'),
- L.map('healthcare')
- ];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement