Thursday, November 24, 2016

Analyze Week 1 QGISresults for use with Mapbox, Leaflet and HTML code for online map publication - Free but not always easy

This entire module has focused on using free openSourced GIS applications.  In prepare week we created and analyzed Food Deserts in Urban Escambia County.  We used the data we had created to make zip files for our food deserts, grocery stores and food oases respectively.  These zip files were imported into our MapBox style and symbology was created using color brewer.  We were careful to note the RGB and HEX values for the colors as we needed one set for Map box and the HEX values for Leaflet.  We grouped our food desert layers in Mapbox and the duplicated them to represent the classification style we had chosen.  I chose to use 5 Manual Breaks for ease of interpretation and what I felt to be an accurate representation of the data from prepare week.  Once I was satisfied with my Mapbox results I moved on to working with leaflet to create a publishable map template.  Using a tutorial from their website as an example we were able to copy the source code to notepad and then edit the paths, directories and commands as needed to produce both a text file and an HTML file with UTF-8 encoding.  This HTML was our resulting map.  During the notepad editing process we chose the leaflet option from the Develop with this style dialog box in Map Box for the map we had created.  This path was then pasted into the appropriate locations within the leaflet notepad text so that leaflet would read the URL of Mapbox and create the internal map link.  We then used leaflet (which uses open street map for its underlying basemap) to create our map opening location, labled city pop up, a circular food oasis and a polygon representing a food desert.  The latter two items could be hovered upon to see what they represented.  We created a legend within our notepad code and referred to our hex values for the assigned colors and our mapbox map for the associated values.  Our final step was to enable a find feature which utilized a geocoding plug in to locate specific areas on the map by choosing the magnifying symbol and typing in an address or city.

Here is the link to my published map:  http://students.uwf.edu/rh51/GIS4930_SpecialTopics/leaflet/webmapsource.html

No comments:

Post a Comment