In our final example in this chapter, we'll get off of the bus and out into the field. Modern smartphones, tablets, and laptops allow us to update a GIS and view those updates from everywhere. We'll use HTML, GeoJSON, the Leaflet JavaScript library, and a pure-Python library named Folium to create a client-server application that allows us to post geospatial information to a server and then create an interactive web map to view those data updates.
First, we need a web form that shows your current location and updates the server when you submit the form with comments about your location. You can find the form here: http://geospatialpython.github.io/Learn/fieldwork.html.
The following screenshot shows the form:
You can view the source of that form to see how it works. The mapping is done using the Leaflet library and posts GeoJSON to a unique URL...