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!

Top comments (78)

Collapse
 
rhymes profile image
rhymes • Edited

Hi @mourner !

I don't have any questions, and unfortunately I have never used Leaflet, yet.

Just wanted to say that you seem like a really great person and I loved the letter you received from the 77 year old!

Keep doing what you do!

Collapse
 
mourner profile image
Vladimir Agafonkin

Thank you very much!

Collapse
 
ourmikegeorge profile image
Mike George

Leaflet is a very nice library that I've used on a couple of sites 👍

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

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

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

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
 
mourner profile image
Vladimir Agafonkin

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
 
stdavis profile image
Scott Davis

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

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

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

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
 
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

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
 
moianwatkins profile image
Ian Watkins

As I've always said, need some "mapping" solution for a problem you have? Check Vladimir's repos before anywhere else.

We use Leaflet operationally on our public website for weather maps and other specialist maps.

Needed a pole of inaccessibility calc for label placement on overlapping polygons, oh, Vladimir has polylabel.

Do yourself a favour, check his repos first.

On a personal note, thank you for all your effort, on Leaflet and on the more specialist libs. I really appreciate it and has saved me a lot of time.

Cheers

Ian

Collapse
 
mourner profile image
Vladimir Agafonkin

Very happy to hear that, thank you!

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

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
 
jingsam profile image
jingsam

Hi, mourner. I notice that many core vital algorithms are implemented by referencing academic papers. As reading academic papers are boring and tedious, how do you find one algorithm in papers that works?

Collapse
 
mourner profile image
Vladimir Agafonkin

It can be tedious indeed, and most papers are beyond my comprehension. So with practice, I learned to skim papers very quickly — e.g. go through abstract, conclusion, then scan the pictures, look for algorithm pseudocode etc. Now I can determine if a paper is worth reading into in more detail after a quick skim.

Collapse
 
sirjessthebrave profile image
Jessica Bell

What do you think tech folks around the world could learn from the local scene in Kiev? What is the local tech community there struggling with the most?

Collapse
 
mourner profile image
Vladimir Agafonkin • Edited

Kyiv is one of the biggest and fastest growing tech hubs in Europe, and one of the leading IT outsourcing hotspots in the world. Here's a good overview of the reasons, but I feel it comes down to two things:

  • Affordable, heavily STEM-focused education system, with multiple world class universities in the city. While it can feel pretty outdated at times, it gives a very strong foundation (e.g. mathematics), which eventually produces many top-talent engineers.
  • Abysmally low taxes, living and operational costs for engineers. It's very cheap to set up a startup team here compared to most other countries.

Kyiv is also a pretty comfortable, walkable city with lots of greenery, great food, awesome subway system, tons of coworking spaces.

The struggles are there too:

  • A LOT of the top talent immigrates to Europe and US. Mostly due to corruption, inadequate government, bad social security and unstable economy. Hundreds of my Ukrainian ex-colleagues now live in Berlin, Amsterdam, London, SF & Bay Area.
  • You'll find the diversity quite lackluster compared to the West — engineers are predominantly male, and there's a lot of gender bias (e.g. many people from the older generation think that girls don't need STEM education and instead have to find a husband and raise kids, cook and clean at home all the time). The situation is steadily improving every year though.
  • Most of the tech scene is outsourcing — Kyiv is heavily lacking in product startups, although this gets better too.
Collapse
 
bohdanstupak1 profile image
Bohdan Stupak

Hi Vladimir.
Looks like I'm a bit too late for the party, but still, I've decided to drop in with some words of appreciation.
I'm using leaflet for my pet-project and although I can't appreciate it at full-scale as pet-project is something that you craft for 15 minutes per month still I've enjoyed using this library and was pleased to hear that the author comes from the same city as me.
But what was the most surprising is that you're a guitarist of Обійми Дощу. This is really amazing how one can be both a decent software engineer and successful artist. Your path inspires me a lot!
P.S. Today I've listened to your new album Сон. Although IMO it's hard to say something new in a genre of progressive metal as there are already some mastodons who are there for decades, still I enjoy how you've embraced dozen of influences we love in progressive metal to create your own beautiful multi-layered mixture. Although Обійми Дощу and Somali Yacht Club represent different genres to me they both are great this year discoveries which show how Ukrainians do some world-class musicianship. Keep rocking \m/

Collapse
 
danielceregatti profile image
Daniel Ceregatti

I attended Mapbox Locate recently and after Lauren Budorick's presentation on mapbox-gl I wondered if the power of GL could not be leveraged for performing spatial queries on geometric data that have already been loaded into a browser, as an alternative to turf.js on the front end. Is this something you've pondered, and/or do you see any viability in pursuing such a thing?

Collapse
 
mourner profile image
Vladimir Agafonkin

WebGL is great for rendering large amounts of data, but is very difficult to use for actual processing and analysis. There are many research papers with geometric algorithms tailored for the GPU for massive parallelization, but pretty much no real implementations, and those algorithms use advanced APIs such as compute shaders, which are currently not available for WebGL and won't be for a while. Khronos is working on such an extension for the upcoming WebGL 2.0, but it will take a long time.

Collapse
 
andy profile image
Andy Zhao (he/him)

Hey Vladimir! How much math would you say is involved in developing map tools and map development in general?

Collapse
 
mourner profile image
Vladimir Agafonkin

Quite a bit when working on map rendering and when implementing geometric algorithms, but nothing you can't catch up on quickly online — mostly basic vector and matrix math. The most advanced math concept I ever used in my 13-year career is function derivative, and only once — it was a very unexpected use.

Collapse
 
andy profile image
Andy Zhao (he/him)

Interesting, thanks for the response! Do you find that math influences your development and/or your music?

Thread Thread
 
mourner profile image
Vladimir Agafonkin

Yes, but not directly — I feel like graduating Applied Math immensely helped me structure my brain and prepared me for hard challenges ahead, even though I don't remember much of what I studied.

Collapse
 
knbknb profile image
Knut Behrends

Currently Mapbox has 772 open-source repositories on github. That's too many for me to investigate or browse. What are your favorite ones?

Collapse
 
mourner profile image
Vladimir Agafonkin

I actually built a tool a while ago to be able to answer that question — it sorts organization repos by stars. :)

But since I'm involved with all my personal favorite ones, you can check out this list instead.

Collapse
 
baibao profile image
baibao

I got a big inspiration from you now.

But how can I keep myself as engineer working with only programming; because sometimes it is really hard for me when above management trying to push me into management role and I don't want.

Would you please give suggestion; I wanna stay in engineer path like you.

THANKS!

Collapse
 
mourner profile image
Vladimir Agafonkin

Thank you! I was just always upfront about it — if management asked me about how I see my career going forward, I'd always answer that I want to continue solving difficult engineering challenges, and not interested in management roles.

Collapse
 
jjjjcccjjf profile image
endan

Wherd'ya get your username? ;)

Collapse
 
mourner profile image
Vladimir Agafonkin

Oh, it's from my early student years when I considered myself a goth, wore a dark long coat and wanted to look all very grim, dark and mysterious. It stuck afterwards, and I like it. :)