1. !
Building Maps with Leaflet
Andrew Howard
Digital Humanities Hub
The Australian National University
2. What is Leaflet
• A lightweight Open Source toolkit for
displaying web and mobile friendly maps.
• http://www.leafletjs.com
!2
3. Why Leaflet
•
•
•
•
Small and fast (~33KB for base toolkit)
Easy to use API
Extensive range of plug-ins
Supports a variety of open and
commercial map tile and overlay
providers
!3
6. Tile Sources (Open and Commercial)
•
•
•
•
•
Cloudmade
Mapbox
Open Street Maps (OSM)
Acetate
High definition imagery providers
!
• Run your own tile server
– More detail here
!6
18. Leaflet Plugins
• Layers & Overlays
– Leaflet.MultiTileLayer
– Leaflet.AwesomeMarkers
– Leaflet.markercluster
!
• Services, Providers
and Formats
– Plugins by Pavel
Shramov GPX, KML layers;
Bing tile layer; Google and
Yandex layers (implemented
with their APIs), Permalink and
alternative Scale controls.
– leaflet-providers
– Leaflet.dbpediaLayer
load via ajax from DBpedia's
SPARQL endpoint.
!18
19. Leaflet plugins
• Controls and
Interaction
– Leaflet.draw
– Leaflet Time-Slider
• Other Plugins and
Libraries
• Geocoding
(Address Lookup)
– Leaflet GeoSearch
Google, OpenStreetMap
Nominatim, Bing, Esri and
Nokia.
!
!
!
!19
21. Full featured example
• Multiple map tile and overlay
providers
• Address lookup
• Geolocation
• Annotation
• DBPedia Linked data search and
display
!21
25. OpenGeo Suite
• A packaged set of open source
technologies to operate a personal or
institutional map server
– http://boundlessgeo.com/solutions/opengeo-suite/
!25
26. Summary
• Leaflet
– Open Source
– Easy to use
– Powerful API
– Different map layers
• Open and Commercial
– Overlaying static and dynamic information
!26