I have created a complex map of my area and I wish to publish it as an interactive map on the web. The dataset appears to be too large for QGIS2Web to work - the script completes eventually but in loading into the browser it displays the first view but then fails to load the rest of the data, change views, or display the legend, and so it appears to hang. Is there any other plugin or application that I can use? I would like to publish a map that enables users to zoom in and out, select and deselect layers, and click on the various map items. Much like QGIS itself really.
To make the qgis2web export and the view within a browser faster you have also this possibilities:
point/polygon layers: not all layers visible ("layers and groups") Now the user have the own decision, when he/she want to see a particular layer.
point layers: cluster active
polygon layers: - Minify GeoJSON files (remove unnecessary whitespace from exported GeoJSON to reduce file size) - Precision (Simplify geometry to reduce file size), for example "6" to find under "Export"
I worked with the leaflet export and have tested all possibilities with success.
Edit: You can also do that: line layers: If you do not need informations for every line (for examples rivers) you can also union all rivers within a layer (vector-geo..tools-dissolve). Or you can dissolve groups. For example: You have 500 rivers. Now you need a column, name "size". Now every river get the value "1" within size. Then you can use the function union and choose the field "size". Result: You have only one line in your new table in a new file/layer. For qgis2web it is now possible to show the layer faster. In the table you see only one line, but with all rivers!
You need to store your map in various levels of generalization. So when you need to show the whole map in the first view, you would be able to show a generalized map which is small rather than reading the whole original big map.
When the user zooms in you should fetch another map which is more detailed but still not the original big map. So by each zoom the user gets closer to the original map while limiting it’s viewing extent more and more in the meantime. Think of it as a pyramid (ESRI calls it pyramid too).
To provide an even better user experience, it is also a good idea to break each of your maps (in your pyramid) into tiles.
To recap, you need to
- Store different version of your map for different zoom levels
- Create a tile server for zoom levels that worth it!
There are a lot of libraries and frameworks that help you implement these functionalities. PostGIS for instance has implemented douglas-peucker algorithm to generalize your spatial data if you like to do it yourself. Please take a look at this link for more information on Generalization.
QGIS also supports Tile service (as it is a WMTS compliant software), I recommend to take a look at it too.
The best case scenario is that you import your data into PostgreSQL(PostGIS) and create various representation (generalaized maps) then publish each of them into your QGIS Tile server and configure each maps to show up in a particular zoom spectrom.