Is Leaflet a better tool than Google Maps?
Joe Maddalone pits Google’s multimillion dollar-backed mapping service against its rather smaller, open source rival.
If you need to embed a map into your project, you could be forgiven for thinking Google Maps is your only choice. It's used by over 2 million sites and it's a proven technology, having been launched in 2005.
There's however an alternative – Leaflet. It's is an open source JavaScript library that provides mapping capabilities. It was developed by Vladimir Agafonkin, it launched in 2010 and is used by over 20,000 sites.
We pit the two technologies against each other and tell you which is right for your project.
Overview
Leaflet - Additional features can be added in by utilising plugins. Leaflet is usually used in conjunction with OpenStreetMaps, but can utilise other map data services, including Google Maps.
Google Maps - Google Maps requires very little knowledge to implement even some of its most complex features. However, end users have very little control over how the map data is presented.
The regular person case
Leaflet - Adding a map to a simple website is definitely a lot trickier for the average person using Leaflet. Many features will prove too much effort for those looking for a plug-and-play solution.
Google Maps - There is simply no easier way to add a fully featured map to a website, with directions, street view, distance data and more. There are some limitations in resolution and requests per day.
Get top Black Friday deals sent straight to your inbox: Sign up now!
We curate the best offers on creative kit and give our expert recommendations to save you time this Black Friday. Upgrade your setup for less with Creative Bloq.
The developer case
Leaflet - The level of control over Leaflet is unparalleled, with an ever-growing collection of plugins and constantly updated, developer-driven API. The ability to design every aspect of your map implementation without fear of licensing or unexpected data changes makes Leaflet the clear development choice.
Google Maps - Developing a consumer-facing application based on Google Maps would require a huge leap of faith that Google won’t taint the experience with its own agenda. A dependency on Google’s backing service may present itself one day as unwanted ads, reviews, +1s and other distracting data.
Ever onwards
Leaflet - Leaflet’s development velocity is only matched by the pace of the open source projects it is partnered with and the number of third-party projects being built around the simple mapping library.
Google Maps - Street View and the acquisition of Skybox’s real-time micro-satellite service imply a clear path to a staggering amount of data unlikely to be seen in any open source counterpart.
Verdict
Need directions? Use Google Maps. Need to develop an application? Use Leaflet. The mere need to compare an application backed by billions of dollars to one where 90 per cent of the code is still contributed by a single developer from Kiev exposes the new ecosystem of web applications we have entered into recently.
Removed from the OS and low-level languages like C/C++, open source applications like Leaflet are the proverbial ‘barbarians’ once at the gate of the commercial incumbents, now building superior castles right next door.
Words: Joe Maddalone
Joe Maddalone is a JavaScript developer and an instructor at egghead.io. Follow him on Twitter at @joemaddalone.
Like this? Read these!
- How to use SVG to create responsive maps
- The best free script fonts (don't use this together with 'cursive fonts')
- Free graffiti font selection
Have you found any great mapping tools or tips? Let us know in the Comments!
Thank you for reading 5 articles this month* Join now for unlimited access
Enjoy your first month for just £1 / $1 / €1
*Read 5 free articles per month without a subscription
Join now for unlimited access
Try first month for just £1 / $1 / €1
The Creative Bloq team is made up of a group of design fans, and has changed and evolved since Creative Bloq began back in 2012. The current website team consists of eight full-time members of staff: Editor Georgia Coggan, Deputy Editor Rosie Hilder, Ecommerce Editor Beren Neale, Senior News Editor Daniel Piper, Editor, Digital Art and 3D Ian Dean, Tech Reviews Editor Erlingur Einarsson and Ecommerce Writer Beth Nicholls and Staff Writer Natalie Fear, as well as a roster of freelancers from around the world. The 3D World and ImagineFX magazine teams also pitch in, ensuring that content from 3D World and ImagineFX is represented on Creative Bloq.