Git Product home page Git Product logo

qgis2web / qgis2web Goto Github PK

View Code? Open in Web Editor NEW
546.0 50.0 143.0 31.53 MB

QGIS plugin to export your project to an OpenLayers or Leaflet webmap. No server-side software required.

Home Page: https://plugins.qgis.org/plugins/qgis2web/

License: GNU General Public License v2.0

Python 31.20% CSS 2.20% JavaScript 66.04% HTML 0.16% Makefile 0.40%
qgis webmap leafletjs openlayers qgis-plugin leaflet html javascript css

qgis2web's Introduction

GitHub version Donate

qgis2web

    qgis2web

QGIS plugin to export your project to an OpenLayers or Leaflet webmap.
It replicates as many aspects of the project as it can, including layers, extent and styles (including categorized and graduated).
No server-side software required.

Installation

  • In QGIS, select Plugins > Manage and Install Plugins...

or:

  • Download and unzip this repo to your QGIS plugins directory

Usage

Prepare your map as far as possible in QGIS, as you want it to appear in your webmap. Specific tasks you can carry out to improve your webmap include:

  • Set your project title, and background and highlight colours in Project > Project Properties...
  • Give your layers human-friendly names in the Layers Panel
  • Give your layer columns human friendly names via Layer > Properties > Fields > Alias
  • Hide the columns you don't want to appear in your popups by changing their Edit widget to "Hidden"
  • If any of your fields contain image filenames, change their Edit widget to "Photo" to have the images appear in popups
  • Style your layers, and set their scale-dependent visibility, if required

Run qgis2web from the Web menu, or via its icon. If required, choose a basemap from the list below the preview pane, and click "Update preview". CTRL/CMD-click for multiple basemaps or to deselect a basemap.

The top-left pane lets you set options for each layer in your map. The bottom-left pane sets overall options for your project. All options are written to your QGIS project, so save your project if you want to keep these settings.

More info on the WIKI

Awards

qgis2web is among the winners of the OSGeo:UK 2023 competition via GoFundGeo
os geo uk

Donations

We are thrilled to see how widely our project is being used and appreciated around the world. The development and maintenance require significant time and effort, and we want to continue improving and adding new features.

Please consider a small donation; even a modest "virtual coffee" can help support our commitment to providing quality software.


🎁 As a token of our gratitude, donors will receive as a gift qgis2opengis (a plugin enhancing OpenLayers export of qgis2web).🎁

Thank you for your support!
Happy mapping!🗺️

Credits

qgis2web is fundamentally a merge of Victor Olaya's qgis-ol3 and Riccardo Klinger's qgis2leaf. It would not exist without their work. Thank you, gentlemen. Thanks are also very much due to Paolo Cavallini, who suggested and supported the merge.

  • @volaya
  • @riccardoklinger
  • @pcav

Obviously, qgis2web could not exist without the following monumental software:

  • QGIS
  • OpenLayers
  • Leaflet

Thanks are also due for major code contributions to:

  • @akbargumbira
  • @lucacasagrande
  • @walkermatt
  • @boesiii
  • @ThomasG77
  • @NathanW2
  • @nyalldawson (FTP export for Faunalia/ENEL)
  • @perliedman
  • @olakov

In addition, the following libraries have been used:

qgis2web's People

Contributors

agiudiceandrea avatar ahocevar avatar akbargumbira avatar andreaordonselli avatar boesiii avatar cukavac avatar garprogram avatar geospark avatar greenkeeper[bot] avatar jaminmelville avatar jef-n avatar jnicho02 avatar kannes avatar kgjenkins avatar lucacasagrande avatar m-kuhn avatar mbernasocchi avatar nyalldawson avatar olakov avatar paulds8 avatar riccardoklinger avatar saerdnaer avatar shivareddyiirs avatar slarosa avatar tfh-galbraith avatar todointx avatar tomasholderness avatar tomchadwin avatar walkermatt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

qgis2web's Issues

cluster option fails

unchecked the option for epsg 3857 layers and press leaflet preview:

Traceback (most recent call last):
File "/home/ricckli/.qgis2/python/plugins/qgis2web/maindialog.py", line 127, in previewLeaflet
previewFile = writeLeaflet(utils.tempFolder(), 500, 700, 1, layers, "show all", "", cluster, "", "", "", "", "", "", "", "", 0, 0, json, params)
File "/home/ricckli/.qgis2/python/plugins/qgis2web/leafletWriter.py", line 413, in writeLeaflet
print "Cluster: " + unicode(cluster_set[count])
IndexError: list index out of range

export also fails in real export. failing means: expot folder is created, index.html contains complete code but console in firebug does not throw any error and index.html in browser is blank

Logo

I've got a PNG, but just dropping it into the icons folder doesn't seem to work - how do I compile it into the resources file (I'm on Win7)?

Add Leaflet preview

Add a second tab to the preview pane, containing a preview of the Leaflet export

Update readme

readme.md still only contains @riccardoklinger's initial plans for the plugin. I don't really know what to replace that with, but it needs to be done.

Outline: simple line crashes Leaflet export

If I set the polygon style to Outline:Simple Line for both layers and then export to OL3 I get the effect I want - outlines and no fill. Exporting to Leaflet results in a error about Leaflet not being able to render that kind of styling:

Traceback (most recent call last): File "C:/Users/me/.qgis2/python/plugins\qgis2web\maindialog.py", line 138, in saveLeaf writeLeaflet("index.html", "", "", "", 600, 400, "canvas extent", "", layers, "show all", "", 0, 0, "", "", "", "", "", "", 15, "", "", "", 0) File "C:/Users/me/.qgis2/python/plugins\qgis2web\leafletWriter.py", line 476, in writeLeaflet if symbol.symbolLayer(0).brushStyle() == 0: AttributeError: 'QgsSimpleLineSymbolLayerV2' object has no attribute 'brushStyle'

I guess this could all be tweaked in the index.html and CSS files once all the hard work has been done by your plugin.

Simple fill opacity ignored

I have two polygon layers in my test project. They are using simple fill with the fill opacity set to 0% (totally transparent) and border nice and solid.

Exporting to both Leaflet and OL3 ignores the opacity setting and my layers are filled with colour.

layers not added in leaflet

tried new master 0.3: layers exported in leaflet option (JSONs are in /data) but layer add is not complete. only raster is shown:
preview also does not show any layers
screenshot from 2015-05-06 20 19 50
got this error in firebug:
referenceError: exp_placesfew1EPSG3857JSON is not defined
feature_group.addLayer(exp_placesfew1EPSG3857JSON);

it is not added via "new L.geoJson(...) like this
var exp_placesfew1JSON = new L.geoJson(exp_placesfew1,{
onEachFeature: pop_placesfew1,
pointToLayer: function (feature, latlng) {
return L.circleMarker(latlng, {
radius: 4.0,
fillColor: '#ff30ee',
color: '#000000',
weight: 1,
opacity: 1.0,
fillOpacity: 1.0
})
}
});

is it still a problem of projection?

UI icons have disappeared

The qgis-ol3 icon which identifies the plugin, and the OL3 and Leaflet icons, seem to have disappeared, though they were present before.

Wiki

I've not enabled the wiki on this repo yet, but we probably need one. However, I don't yet know what information needs to be on it.

Leaflet appearance settings - base layer not showing

When I export my QGIS project as a Leaflet project the Base layer selected in Appearance under Settings does not appear in the final map output.

In my test project I have two layers (PostGIS polygons) and a base layer (WMS) and they all appear correctly.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.