Intro

In my previous post, I discussed using the CSV from your Google Fusion Table to build a web map with QGIS.

Here, we will utilize the KML file and it is significantly easier! Again though, if you’re using place names or addresses and relying on Google’s geolocation services, getting switched over will require additional data and manipulation. If you want help with that, hire me! Get in touch via Twitter (@gisn8) or on the Contact form.

I’ve got a zoning map I’ve embedded that needs to get off Fusion Tables and live somewhere else.

The map is coming straight from Fusion Tables and the panel on the right is hard coded to the page, so as long as my new map follows the same color codes, I’ll be just fine to swap them out. And what’s even cooler about downloading the KML is that the popup code comes right along with it! You don’t have to do the heavy lifting on that!

Go to your Fusion Table and go to File>Download and download the KML file (not the one with network link because that will break when Fusion Tables go away).

To bring it into QGIS, access the Data Source Manager from the Layer menu and use the Vector options. Navigate to your kml file and click Add.

I will also bring in a Google base map and modify the projection to EPSG: 3857 like I did in the previous tutorial.

From here on, most of the steps from the previous tutorial can be adopted, but I did find one very significant option. If the data does NOT need to be updated, by right-clicking and opening the Attribute Table it shows a column called description that carries over the pop-up data, so I can easily utilize that for my new map. We would hide all other columns and let the description column do it’s thing. Otherwise, I’d need to build the virtual layer as before.

For my use, I need to color these by use. While I could use let QGIS use the HEX column for the color, it won’t translate to QGIS2Web, so that will need to be manually done. To do this, right-click on the layer, open properties and go to Symbology. From the top options, choose Categorized.

With Categorized, double-clicking the swatch lets you select the color you want to use. Double-click on the Legend text to modify how you want it to be listed in a legend if you like; renaming the legend items won’t improve the web map, but is a handy reference for your own use in QGIS. By expanding Layer Rendering, I will adjust the Opacity of the layer as well.

From here, you can use the QGIS2Web plugin as before to generate your new webmap.

Comment