Maptime

Time for making maps!

Our mission is to open the doors of cartographic possibility to anyone interested by creating a time and space for collaborative learning, exploration, and map creation using mapping tools and technologies.

Learning Leaflet

For people who are new to mapping (and to coding in general), going through something like Leaflet’s most basic tutorial – the Quick Start guide – can be truly daunting. What do you mean there are script tags around that line of code? Was I supposed to put that in the head or the body? Such basic questions can simply be invitation into a rabbit hole of internet despair, which can thwart learning more about this styling tool.

Meghan and I – two new Leaflet users at tonight’s MapTime – were very lucky for a slow night at MapTime, with our only company being MapBox ID creator John Firebaugh. It ended up being a great session for question-answering and at some points some flat out handholding.

"Learning Leaflet!" Indeed, if we hadn’t had his help, there’s no way I would have gone from zero to the above, er, beautifully, um, styled map. (Whatever, it works, the code is clean, and that red marker moves!)

If you want to make your own, hopefully more beautifully styled map at home, without the aid of your very own John, then try this exercise:

  1. Follow Leaflet’s Get Started Guide, using the structure below as a guide.

"Code sample"

  1. Try swapping out the styling properties with properties using custom styling built in Mapbox styles. (Hint: what can you swap from the above code using the code in the MapID box below.) (Another hint: there’s more characters in the MapID box than you see, so be sure to select all).

"Mapbox styles"

Good luck! Let us know how you do and if you have any hangups or questions.