I have a fairly large data set, about 5 million features, that I need to display on the web using Google Maps API. I am currently processing the file in QGis with XYZ Tiles, and using the generated tiles to display on the web.

This method works, and benefits are:

  • Super fast load time on the web
  • Free to use
  • Works with Google Maps API

However, the cons are:

  • A lot of overhead in processing time
  • A lot of space required for multiple zoom levels (Turns a ~2GB file into ~200GB directory)

For my purposes, only a small portion of the map will need to be displayed at one time (~1km x 1km), but the entire area covers all of Ontario (~1,600km x 1,500km). I also need to regenerate these tiles monthly based on an updated vector file

So my question is, what other options do I have to display this data? I only need to show a small portion of the map at a time, so is there a way to filter the vector file to display only what's needed?


You should look at using vector tiles. I dont know much about Google Maps API but I found this:


which was mentioned here:


Here is something you can use with OpenLayers or Leaflet https://github.com/mapbox/geojson-vt

  • Currently looking into using vector tiles as I think it's my best option. I think the rendering portion with Google I'm comfortable with, but the tricky part is creating the tiles themselves on the back end. Before I was using XYZ Tiles, and now I'm working on a custom script in QGIS – Mackija Jan 7 '20 at 17:00
  • Any chance you can add the script you are using for Qgis to this post? – GreyHippo Jan 7 '20 at 17:33
  • For sure, once I finish I'll add it as an answer for future users – Mackija Jan 7 '20 at 17:39

A library to load vector tiles in Google Maps: https://github.com/techjb/Vector-Tiles-Google-Maps

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.