Skip to content

Leaflet

Leaflet is a JavaScript library that draws interactive maps in a web page.

Visit Leaflet

What does Leaflet do with a venue you already know?

It can put a marker at the venue’s latitude and longitude, the numbers that describe its position. Add a tile layer to give people the map around that pin. Tiles are small pieces of the background loaded as people move or zoom. Choose where those tiles come from and show the credit that source requires.

What if a customer types an address?

Choose a geocoder, a service that turns a written address into coordinates. Leaflet can display the returned pin. If a customer wants a route, decide whether to open a separate map app or use a routing service for directions inside your own app.

What costs money or needs maintenance?

Leaflet is open-source under the BSD 2-Clause license. The tile provider, address search and route service have their own costs and usage terms. Use the documentation for your Leaflet version. The 1.9 and 2.0 beta guides use different setup code, and some add-ons may need the older version.

How would you design a map pin for an event?

Draw a fictional event card and a simple street grid. Keep this on paper.

  1. Keep the venue details together
    Write the event name, street address and pin coordinates in your own venue record. Put the exact entrance and address beside the map so visitors can still read them if the tiles fail.
  2. Label each dependency
    Write who supplies the map background and where their credit appears. If you add address search or directions later, mark which other service would do that job.