Introduction to Web Maps with Leaflet
Introduction
This beginner-level workshop is intended for anyone interested in getting started with creating web maps. There are two main sections: an introduction to web maps, and a hands-on where we will copy/paste code to make an interactive map of UBC-V Campus powered by Leaflet. This workshop aims to develop the fundamental knowledge and skills to begin web mapping while providing opportunities to ask questions. Upon completion of this workshop you will have a boilerplate code which you can build upon and tinker with on your own.
Pre-Workshop Setup
Workshop Data
All of the data for this workshop is free and openly available. However, to get started you’ll need to download and save it to your computer. During the hands-on portion you’ll work with this data in your source-code editor by copy/pasting the code provided to you.
Click on the ‘Download Data’ button below to start the download. Once complete, extract the contents of the .zip file.
Software Used
- Internet browser (and an internet connection). The most recent versions of Mozilla Firefox and Google Chrome are the recommended browsers.
- Source code editor. To make your life easier while viewing or editing code, it’s good to use a source code editor. In this workshop we’ll use Visual Studio Code, but other editors like Notepad++ and Sublime Text will work similarly.
Prerequisites
Making maps is hard. And, without practice, working in the web is hard too. While there are no prerequisites for this workshop, familiarity with cartographic principles and a basic understanding of what code is and does will make diving into web mapping easier. Refer to these resources at any time:
- Intro level knowledge of computer programming. Matt Adesanya’s A Gentler Introduction to Programming is a great starting point, and will be more than you need for this workshop.
- Intro level knowledge of HTML, CSS and JavaScript. Sololearn.com offers several courses on these topics and more, but there are several other educational resources to choose from on the web if you prefer something different. You’re not expected to be a pro for this workshop, but understanding these concepts will provide some very useful perspective.
- Understanding of basic cartographic design concepts. What is map making without a consideration of cartography? Axis Maps has written a phenomenal short guide to cartography, and the web map module is especially relevant.
What you will build
All set? Let’s begin web mapping!
Geospatial Information Resources at UBC:
- General Informational website for all things UBC GIS: gis.ubc.ca
- UBC Library’s guide for finding and working with GIS resources: guides.library.ubc.ca/gis
- Archive of all Research Commons workshops
- Evan Thornberry, GIS Librarian:
evan.thornberry AT ubc.ca
- Schedule a 1:1 consult with the geospatial team here