Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2019
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1. <div id="map1"></div>
  2. ...var map = L.map('map1').setView([37.8, -96], 4);...
  3. <div id="map2"></div>
  4. ...var map = L.map('map2').setView([37.8, -96], 4);...
  5. <div id="map3"></div>
  6. ...var map = L.map('map3').setView([37.8, -96], 4);...
  7.  
  8. var info = L.control();
  9. info.onAdd = function (map) {
  10. this._div = L.DomUtil.create('div', 'info'); // create a div with a class "info"
  11. this.update();
  12. return this._div;
  13. };
  14. // method that we will use to update the control based on feature properties passed
  15. info.update = function (props) {
  16. this._div.innerHTML = '<h4>US Population Density</h4>' + (props ?
  17. '<b>' + props.name + '</b><br />' + props.density + ' people / mi<sup>2</sup>'
  18. : 'Hover over a state');
  19. };
  20. info.addTo(map);
  21.  
  22. var map = L.map('map1');
  23. var map = L.map('map2');
  24. var map = L.map('map3');
  25.  
  26. <!-- Just sheets of paper we can draw on, nothing more -->
  27. <div id="weather"></div>
  28. <div id="population"></div>
  29. <div id="healthcare"></div>
  30.  
  31. // Stop eating the crayons
  32. var map = L.map('weather');
  33.  
  34. var map = L.map('population');
  35.  
  36. var map = L.map('healthcare');
  37.  
  38. var weatherMap = L.map('weather');
  39. var populationMap = L.map('population');
  40. var healthcareMap - L.map('healthcare');
  41.  
  42. var maps = [
  43. L.map('weather'),
  44. L.map('population'),
  45. L.map('healthcare')
  46. ];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement