100 likes | 126 Views
Leaflet at a Glance. Matthew Przyborski Sam Moore GEO244 April 27, 2017. What is Leaflet?. A popular, lightweight (38 kb) JavaScript library Ideal for making mobile-friendly interactive maps Can be used on all major desktop and mobile platforms Uses JS, HTML5 and CSS3.
E N D
Leaflet at a Glance Matthew Przyborski Sam Moore GEO244 April 27, 2017
What is Leaflet? • A popular, lightweight (38 kb) JavaScript library • Ideal for making mobile-friendly interactive maps • Can be used on all major desktop and mobile platforms • Uses JS, HTML5 and CSS3
Does Leaflet have documentation? Short answer: Yes! Well organized webpage Each subsection has its name, type, default setting and description Even other subsections named in the description are hyperlinked http://leafletjs.com/reference-1.0.3.html
Leaflet does the basics best Interactive functions Toggle overlays Drag panning with inertia Double-click, scroll wheel or pinch or Shift + drag to zoom Drag marker Keyboard navigation Events (clicking, mouseover, etc.) Representative functions • Vector and image overlays • Chloropleth, proportional symbol and dot density maps • Markers and popups • WMS • GeoJSON • Animation for pan, zoom, fade
Leaflet is modular and customizable Add desired features and customize to fit your preferences. Supportive open source community Hundreds of plugins and APIs. Most common mashups use Google, Mapbox, ESRI, QGIS and/or D3.
Leaflet example map • http://leafletjs.com/examples/choropleth/
Final Thoughts about Leaflet • What Leaflet does not do • Not a GIS • Does not provide any data • Focuses on performing basic functions well • “Lightweight” compared to other technologies • Framework for showing and interacting with map data • You must provide data, basemaps, etc. • Easy to understand even if you don’t know programming language well • Online tutorials • Youtube videos YouTube Image Overlay Tutorial