Get Started with LeafletJS Mapping

Share this video with your friends

Send Tweet

Leaflet makes creating maps in the browser dead simple. With some HTML and 3 lines of JavaScript, we can quickly have a map displaying.

Benjamin
~ 9 years ago

What, if any, are the benefits of using Leaflet over Google Maps?

Ben Clinkinbeardinstructor
~ 9 years ago

Hey Benjamin,

You can definitely be successful with either solution. The first advantage of Leaflet that comes to mind is alternate tile providers. Google obviously uses their own map tiles (the images that are patched together to construct the map view), but using Leaflet you can use any provider you want. We used Mapbox in the video, but there is also OpenStreetMap, MapQuest, and Bing.

All of the providers have different licensing policies, so using Leaflet means you can choose the one that works best for your needs.

I'm sure that is not an exhaustive list of things to consider, but I hope it helps.

Ben

Benjamin
~ 9 years ago

Thank you!

Stephen Marshall
~ 5 years ago

Currently it seems like the Map is always blank, even in the JSBin example. Please let us know how to proceed, what changes need to be made. Thanks.