DEV Community

Cover image for I'm an open source enthusiast at Mapbox, the creator of Leaflet and 40+ other JS libraries, and a rock musician. AMA!
Vladimir Agafonkin for Mapbox

Posted on

I'm an open source enthusiast at Mapbox, the creator of Leaflet and 40+ other JS libraries, and a rock musician. AMA!

Hey! I'm Vladimir Agafonkin (aka @mourner) from Kyiv, Ukraine.

In 2008, I started working on a small web maps library in secret from my boss, who insisted that I should stop "reinventing the wheel" and just use "mature, established solutions". When I reached out to the map developers community, my idea was ridiculed for "wasting time instead of contributing to existing projects".

This little library, Leaflet, eventually became one of the most influential projects in the mapping industry. It is used by Facebook, GitHub, Foursquare, Evernote, Flickr, Pinterest, Etsy, Craigslist, European Commission, NPR, The Washington Post and the like, and has almost 22k stars and 600 contributors on GitHub.

For the last 4.5 years, I've been building mapping tools of the future at Mapbox, focusing on the next-generation map technology, vector maps, and in particular performance, data visualization and computational geometry algorithms. Here are a few examples of what I do:

To keep track of all the open source projects I'm involved with, I created this list. There are many, thanks to Mapbox — I'm incredibly lucky and grateful to have the privilege to work on open source full-time, and do it remotely from Kyiv.

Outside of engineering, I write songs, play guitar and sing in progressive rock band Obiymy Doschu. We've recently released an album we've worked on for 8 years. The lyrics are Ukrainian, but give the album a chance — if you like beautiful, evocative, multilayered rock music, it will speak to you nevertheless.

I'm also a happy father of 4-year-old twin girls. Here's me and my family celebrating Ukraine's Independence Day last year.

Ask me anything!

Oldest comments (78)

Collapse
 
ivansanchez profile image
Iván Sánchez Ortega

What are your thoughts about geodetic grids? Do you think they will be able to take over the tyranny of EPSG:3857 tiles? Could protobuf geodetic hextiles be a thing?

Collapse
 
mourner profile image
Vladimir Agafonkin Mapbox

Probably not taking over any time soon; at least for traditional web maps.

  • The sheer simplicity of Mercator tiles is hard to beat. This is perhaps the biggest driver in the popularity of any software technology.
  • The algorithms that power geospatial databases are designed for rectangular queries, and dealing with hexes would bring a lot of performance overhead.
  • Since most existing mapping software works with Mercator tiles, you don't have to deal with compatibility issues.
  • 99% mapping use cases only need accuracy at higher zoom levels, and don't deal with data around poles, so there's not enough incentive to switch to harder solutions.

However, I'd love for you and others to keep experimenting on that front, regardless of the current status quo — that's how progress happens after all. :)

Collapse
 
ibesora profile image
Isaac Besora Vilardaga

What are your thoughts on 3D mapping? It seems that in the near future, with autonomous cars on the roads, there will be an amazing amount of point cloud data that should be mapped. Removing a dimension of that data to draw it in 2D seems wasteful.

Collapse
 
mourner profile image
Vladimir Agafonkin Mapbox

I definitely see an explosion in the adoption of 3D mapping technologies coming very soon. The two biggest limiting factors up till now were:

  1. Technical limitations such as browser performance, computing power on a typical user's machine — those were pretty much solved. Browsers are now extremely fast, the unbelievably powerful APIs such as WebGL now have mainstream support, and most people carry unbelievable computing power in their pockets. And this change happened much faster than anyone anticipated.
  2. The complexity of dealing with 3D — building easy to use software and APIs, implementing sophisticated visualization techniques, etc. This battle is still ongoing, and my colleagues at Mapbox are working hard to help bring those technologies to widespread adoption sooner.
Collapse
 
ibesora profile image
Isaac Besora Vilardaga

What do you think are the most valued competences you need to have a job like yours?

Collapse
 
mourner profile image
Vladimir Agafonkin Mapbox

The most valued competency is being kind and empathetic to others — it's not just a personality trait, but, as I learned, a skill you have to cultivate. Especially if you're a maintainer of a popular open source software — you'll interact with many people that had a really bad day. Also, in tech companies, communication skills are often much more important than technical proficiency.

The other big one is curiosity — it's the core driving force behind everything I do. Diving head-first into challenging problems, constantly learning, experimenting fearlessly with everything, completely failing 20 times to come up with something amazing on the 21th.

Collapse
 
stdavis profile image
Scott Davis • Edited

How do you keep from being distracted working at home with your beautiful twin girls? I have five children and it can be a challenge especially when I'm on calls.

Collapse
 
mourner profile image
Vladimir Agafonkin Mapbox

So true! It's so distracting with two kids that I can't imagine how you'd get anything at all done with 5 around — very impressive! :)

My solution on most days, especially when I really need to focus, is going to a coworking space — fortunately we have a lot of those in Kyiv, they're cheap (around $100 per month), quiet, with clean desks, fast wifi and free tea/cookies. The closest one to home looks like this:

I also enjoy the commute (around 40 minutes by bus / metro) because it's a perfect time to read my Kindle or listen to a podcast.

When I'm at home, on warm days, I usually work on our balcony, which is relatively quiet compared to the rest of our apartment.

Collapse
 
zeke_4 profile image
Zeke Sikelianos

You created the SunCalc library for calculating sun position, sunlight phases (times for sunrise, sunset, dusk, etc.), moon position and lunar phase for the given location and time. How does it work and what are some interesting ways that people have used it over the years?

Collapse
 
stdavis profile image
Scott Davis

This is a cool use of that project: atom.io/packages/sunset

Collapse
 
mourner profile image
Vladimir Agafonkin Mapbox

The library came out of a website, suncalc.net, which I built more than 8 years ago and pretty much haven't updated since (you can tell by the fact that it still uses Google Maps :) — and I received so many wonderful e-mails about it over the years.

I got letters from imams who used it for optimal prayer times, from a Tibet monk who used it to plan lunches, from air conditioner installers, from people who used it when choosing a home / apartment to buy, and from many enthusiastic gardeners.

But the most endearing e-mail I got related to it is this one, and it warms my heart with joy and happiness:


❤️❤️❤️

Collapse
 
apps4apple profile image
Jeff Maynard

I use suncalc to work out Nautical Twilight for my app River Thames Guide (boats and ships registered in the UK should strike their ensign at 2100 or Nautical Twilight whichever is earlier).
More at riverthamesguide.net

Collapse
 
tomchadwin profile image
Tom Chadwin

Beyond bugfixes and dropping support for eg non-ES6 browsers, what do you see as future developments for Leaflet?

Collapse
 
mourner profile image
Vladimir Agafonkin Mapbox

I don't see Leaflet getting many new features — its whole point is to remain small, simple and lightweight, and given it's maturity, there's not much left to add. I'd actually be happy if we manage to remove some features. :) So the main focus would be on bugfixes, performance, refactoring it to make it even simpler, better docs, more examples, and more extensibility points for plugin authors. However, I won't be against taking Leaflet to a new direction if the community and its other maintainers decide that it's the right choice.

Collapse
 
ivansanchez profile image
Iván Sánchez Ortega

Regarding that: What about any of those fancy frameworks with so-called "server-side rendering"? (I prefer the term "templating").

In particular: Do you think that the advantages of a SvelteJS port of Leaflet (e.g. ability to not use JS on the client) would be worth the problems (e.g. state transition animations, loss of canvas rendering)?

Thread Thread
 
mourner profile image
Vladimir Agafonkin Mapbox

I never thought about it, but it would be cool to explore. :) It's hard to imagine how a JS-less interactive map would look like though — like in pre-Google Maps era with a static image and buttons for panning that reload it?

Thread Thread
 
ivansanchez profile image
Iván Sánchez Ortega

I'd settle for something that is capable of templating all the HTML for the initial state of the map server-side, yet allow for JS-ful interaction afterwards. :-)

Thread Thread
 
tomchadwin profile image
Tom Chadwin

MultiMap FTW

Collapse
 
jwoyame profile image
Jon Woyame

You have the gift of being a prolific creator. How do you prioritize your work and organize your time?

Collapse
 
mourner profile image
Vladimir Agafonkin Mapbox • Edited

To be honest, I'm absolutely terrible at time management and prioritization, and struggle hard to improve. Often, weeks and months will go by without getting anything of interest done. Pretty much all cool things I built were done on short-lived waves of enthusiasm, when I get obsessed with an idea and stop reacting to the outside world until proving that it works.

This makes me really bad at sustainably working on big, complex projects. That's why I prefer creating very small, laser-focused libraries — it's much easier to get them to a useful state before throwing in the towel. Also, with experience, you start to get good at recognizing ideas with a high impact-to-effort ratio.

When it comes to music, unfortunately, I spend a small fraction of the time on it compared to my student years. Otherwise we wouldn't spend 8 years to make one album. :) Hopefully, I'll be able to regain that area of my life more in future.

Collapse
 
andrewchou profile image
Andrew Chou

Hi Vladimir! I'm a huge fan of the work you've done and it's one of my biggest goals to work on geospatial software like you have. I had a few questions if that's okay:

  • How did you get started in this area of combining geospatial and software development?

  • Does it help to have an extensive GIS background when it comes to working with geospatial software? With the tools we have nowadays (especially thanks to you), it's pretty easy to work with maps without any GIS knowledge and it's often the case that they don't really overlap depending on the use case.

  • Do you have any advice for people who want to break into geospatial tech (like myself), especially from the perspective of building tools?

Sorry if any of them are unclear or if there are repeats. Thanks!

Collapse
 
mourner profile image
Vladimir Agafonkin Mapbox

Thank you!

How did you get started in this area of combining geospatial and software development?

I just got lucky — worked for a generic software consultancy in 2008 when our company got a client from the mapping industry, CloudMade. Then I learned about OpenStreetMap, online maps, got excited, and it started from there.

Does it help to have an extensive GIS background when it comes to working with geospatial software?

It probably depends, but in my case, it helped a lot to NOT have any GIS background. This way, I could build a mapping library from a perspective of a total newbie, making it simple and easy to use for others too. You can hear more about my background with Leaflet and mapping in this video.

Do you have any advice for people who want to break into geospatial tech (like myself), especially from the perspective of building tools?

I'd recommend just jumping straight into building something, and learn along the way. Find a cool project idea that you'd feel enthusiastic to work on, and don't worry about having any knowledge gaps — practice is the most effective way to learn.

Or find an open source project to contribute to. I know contributing to popular projects can be intimidating, but you can start small — e.g. even just fixing typos in the docs could be a good gateway, and then you build from there.

Collapse
 
sheyd profile image
Sena Heydari

Vladimir, thank you for this thorough response! In your opinion, is Javascript the best gateway language to get into geospatial software space, or are other languages, e.g. Python or Ruby viable options as well?

Thread Thread
 
mourner profile image
Vladimir Agafonkin Mapbox

JavaScript is perhaps the most popular gateway, but they're all great choices! I'd perhaps add R and Java.

Collapse
 
laurentgontier profile image
laurent gontier • Edited

Hi Vladimir,
I would personally want to thank you for Leaflet. It is an amazing tool !
There was a question below about it's future and I'd love this library to stay around for a while.
Leaflet accepts many plugins but some of them may not be updated by their creator. So some really interesting functions may not be available. Maybe it could be a good idea to embed them to Leaflet and update them yourself along with the library. I'm especially thinking about Locate plug-in and others to support third party external formats (like check when user location overlaps a polygon)
Also, I've been wondering for a long time why it is not possible to rotate maps according to user's device heading.

Collapse
 
mourner profile image
Vladimir Agafonkin Mapbox

Thank you!

  1. Plugins getting out of date is a serious problem, but adopting maintenance of other projects is not something we can usually do, as maintainers already have a lot on their plate. We have to rely on the community to keep most plugins maintained. What I'd love to do in future is creating a better plugin registry, with easy search, GitHub stars, version compatibility indication, maybe a badge of quality, etc — maybe that would help attracting plugin contributions and adding an incentive to keep them up to date.
  2. We might add rotation — there was even an attempt at this some time ago. It's just difficult to introduce rotation while keeping the code simple and easy to maintain, since it's a feature that affects most of the codebase. And there hasn't been enough demand for it to prioritize — usually rotation doesn't work well with raster maps (e.g. labels get upside down, etc.), and works much better in vector maps libraries like Mapbox GL.
Collapse
 
laurentgontier profile image
laurent gontier

Thanks, Vald
As for the plugin, I was thinking about just a few of them that are almost basic needs for map users (locate is, definitely !)
Better plug in management would be a must !

Collapse
 
maheshmad profile image
maheshmad

Bravo!