├── .gitignore ├── Makefile ├── README.md ├── Thumbs.db ├── __init__.py ├── css ├── MarkerCluster.Default.css ├── MarkerCluster.css └── label.css ├── help ├── Makefile ├── make.bat └── source │ ├── conf.py │ └── index.rst ├── js ├── Autolinker.min.js ├── label.js ├── leaflet-hash.js ├── leaflet.markercluster.js ├── proj4.js └── proj4leaflet.js ├── logo_big.png ├── metadata.txt ├── plugin_upload.py ├── qgis2leaf.py ├── qgis2leaf_exec.py ├── qgis2leaf_layerlist.py ├── qgis2leafdialog.py ├── resources.py ├── resources.qrc ├── resources_rc.py ├── test_data ├── donkey.svg ├── line_feature.dbf ├── line_feature.prj ├── line_feature.qpj ├── line_feature.shp ├── line_feature.shx ├── n-32-4_exp_4326.jpg ├── n-32-4_exp_4326.jpg.aux.xml ├── n-33-113-1_4284.tif ├── n-33-113-1_4284.tif.aux.xml ├── n-33-113-1_4326.jpg.aux.xml ├── places_few_1.cpg ├── places_few_1.dbf ├── places_few_1.prj ├── places_few_1.qpj ├── places_few_1.shp ├── places_few_1.shx ├── places_few_1_EPSG3857.dbf ├── places_few_1_EPSG3857.prj ├── places_few_1_EPSG3857.qpj ├── places_few_1_EPSG3857.shp ├── places_few_1_EPSG3857.shx ├── places_few_2.dbf ├── places_few_2.prj ├── places_few_2.qpj ├── places_few_2.shp ├── places_few_2.shx ├── polygon_feature.dbf ├── polygon_feature.prj ├── polygon_feature.qpj ├── polygon_feature.shp ├── polygon_feature.shx └── project_for_export.qgs ├── ui_qgis2leaf.py └── ui_qgis2leaf.ui /.gitignore: -------------------------------------------------------------------------------- 1 | # Can ignore specific files 2 | .DS_Store 3 | 4 | # Use wildcards as well 5 | *~ 6 | *.pyc 7 | 8 | # Can also ignore all directories and files in a directory. 9 | 10 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | #/*************************************************************************** 2 | # qgis2leaf 3 | # 4 | # Exports a QGIS Project to a working leaflet webmap 5 | # ------------------- 6 | # begin : 2014-04-20 7 | # copyright : (C) 2014 by Riccardo Klinger, Geolicious 8 | # email : riccardo.klinger@geolicious.de 9 | # ***************************************************************************/ 10 | # 11 | #/*************************************************************************** 12 | # * * 13 | # * This program is free software; you can redistribute it and/or modify * 14 | # * it under the terms of the GNU General Public License as published by * 15 | # * the Free Software Foundation; either version 2 of the License, or * 16 | # * (at your option) any later version. * 17 | # * * 18 | # ***************************************************************************/ 19 | 20 | # CONFIGURATION 21 | PLUGIN_UPLOAD = $(CURDIR)/plugin_upload.py 22 | 23 | QGISDIR=.qgis2 24 | 25 | # Makefile for a PyQGIS plugin 26 | 27 | # translation 28 | SOURCES = qgis2leaf.py ui_qgis2leaf.py __init__.py qgis2leafdialog.py 29 | #TRANSLATIONS = i18n/qgis2leaf_en.ts 30 | TRANSLATIONS = 31 | 32 | # global 33 | 34 | PLUGINNAME = qgis2leaf 35 | 36 | PY_FILES = qgis2leaf.py qgis2leafdialog.py __init__.py 37 | 38 | EXTRAS = logo.png metadata.txt 39 | 40 | UI_FILES = ui_qgis2leaf.py 41 | 42 | RESOURCE_FILES = resources_rc.py 43 | 44 | HELP = help/build/html 45 | 46 | default: compile 47 | 48 | compile: $(UI_FILES) $(RESOURCE_FILES) 49 | 50 | %_rc.py : %.qrc 51 | pyrcc4 -o $*_rc.py $< 52 | 53 | %.py : %.ui 54 | pyuic4 -o $@ $< 55 | 56 | %.qm : %.ts 57 | lrelease $< 58 | 59 | # The deploy target only works on unix like operating system where 60 | # the Python plugin directory is located at: 61 | # $HOME/$(QGISDIR)/python/plugins 62 | deploy: compile doc transcompile 63 | mkdir -p $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME) 64 | cp -vf $(PY_FILES) $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME) 65 | cp -vf $(UI_FILES) $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME) 66 | cp -vf $(RESOURCE_FILES) $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME) 67 | cp -vf $(EXTRAS) $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME) 68 | cp -vfr i18n $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME) 69 | cp -vfr $(HELP) $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME)/help 70 | 71 | # The dclean target removes compiled python files from plugin directory 72 | # also delets any .svn entry 73 | dclean: 74 | find $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME) -iname "*.pyc" -delete 75 | find $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME) -iname ".svn" -prune -exec rm -Rf {} \; 76 | 77 | # The derase deletes deployed plugin 78 | derase: 79 | rm -Rf $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME) 80 | 81 | # The zip target deploys the plugin and creates a zip file with the deployed 82 | # content. You can then upload the zip file on http://plugins.qgis.org 83 | zip: deploy dclean 84 | rm -f $(PLUGINNAME).zip 85 | cd $(HOME)/$(QGISDIR)/python/plugins; zip -9r $(CURDIR)/$(PLUGINNAME).zip $(PLUGINNAME) 86 | 87 | # Create a zip package of the plugin named $(PLUGINNAME).zip. 88 | # This requires use of git (your plugin development directory must be a 89 | # git repository). 90 | # To use, pass a valid commit or tag as follows: 91 | # make package VERSION=Version_0.3.2 92 | package: compile 93 | rm -f $(PLUGINNAME).zip 94 | git archive --prefix=$(PLUGINNAME)/ -o $(PLUGINNAME).zip $(VERSION) 95 | echo "Created package: $(PLUGINNAME).zip" 96 | 97 | upload: zip 98 | $(PLUGIN_UPLOAD) $(PLUGINNAME).zip 99 | 100 | # transup 101 | # update .ts translation files 102 | transup: 103 | pylupdate4 Makefile 104 | 105 | # transcompile 106 | # compile translation files into .qm binary format 107 | transcompile: $(TRANSLATIONS:.ts=.qm) 108 | 109 | # transclean 110 | # deletes all .qm files 111 | transclean: 112 | rm -f i18n/*.qm 113 | 114 | clean: 115 | rm $(UI_FILES) $(RESOURCE_FILES) 116 | 117 | # build documentation with sphinx 118 | doc: 119 | cd help; make html 120 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Synopsis 2 | 3 | This plugin provides an easy way to distribute and show your QGIS work as a Leaflet webmap. 4 | 5 | ## Usage 6 | 7 | Your current QGIS project holds different data: vector, raster and plugin layers. QGIS2leaf exports the vector layer to GeoJSON and creates a basic webmap from it with the current Leaflet version 0.7.3. Additionally we add your raster data as image overlays with a opacity slider. 8 | 9 | You can choose between several basemap styles and define the initial extent of the map as well as the dimensions of the webmap in your HTML document. To support big data exports you may disable initial loading of the layers to the map. As the webmap has a layer control you can enable visibility of the layers afterwards. 10 | 11 | The popup for features is either a simple table with all your attributes or defined by the attribute 'html_exp' in your QGIS vector layer (check 'line_feature.shp' in the 'test_data' folder). If you want to use a defined symbol in your webmap add an attribute 'icon_exp' to your point shapefile and file it with a relative path on your PC or an HTML statement. You can define different icons for each feature. Please check index.html of the webmap to customize popup position regarding your chosen icon. You may find testdata in 'places_few_1_EPSG3857_categorized.shp' in the 'test_data' folder (Donkey designed by Gabriele Malaspina from the thenounproject.com). 12 | 13 | If you want to export raster files keep in mind to save them as rendered images prior exporting (values must be integers in the range of 0 to 255). 14 | 15 | You can also define a label in the webmap by adding the column 'label_exp' to your layer which will define the text to show in the label. 16 | 17 | For single, categorized and graduated symbol point feature layers we are exporting radius (not for polygons), color and opacity. Unfortunately the export of forms and SVG is not embedded at the moment. 18 | 19 | If you would like to create a legend you need to add the attributes 'legend_exp' (text to be shown) and 'legend_ico' (icon to be shown) to the desired layer and fill in the link to the icon and a text. Check the test files for details. 20 | 21 | The 'locate' button will ask for access to geolocate the browser and will add a marker where the webmap user is found. 22 | 23 | The 'address' button will add a geocode/search window in the upper right corner of the webmap. 24 | 25 | To define your own basemaps, you need to alter the file qgis2leaf_layerlist and simply add your line to the list. The list consists of the basemap names, a URL for the tiles and an attribution string. If you alter the file you need to reload the plugin to see effects. You can use the [plugin reloader plugin](https://plugins.qgis.org/plugins/plugin_reloader/) for this purpose. 26 | 27 | ## Installation 28 | 29 | * Download the source and place it in the '/.qgis2/python/plugins/qgis2leaf' folder 30 | (Windows: 'C:\Users\{username}\.qgis\python\plugins\qgis2leaf') 31 | * Import the plugin using the normal "add plugin" method described [here](http://docs.qgis.org/2.2/en/docs/user_manual/plugins/plugins.html#managing-plugins 'qgis plugins'). 32 | 33 | ## Version_changes 34 | * 2015/04/16 v.1.5.2: solved raster export issues, layer stacking order, and layer visibility 35 | * 2015/04/14 v.1.5.1: Added https://github.com/tomchadwin to authors 36 | * 2015/03/26 v.1.5.0: Major code refactor; tidy output 37 | * 2015/03/17 v.1.4.2: fixed hidden polygon layers; added pen styles 38 | * 2014/12/11 v.1.4.1: bugs for labels fixes. style issue for labels solved 39 | * 2014/12/05 v.1.4: support for label export, embedding of remote WMS servers thanks to [tomchadwin](https://github.com/tomchadwin) and [mtravis](https://github.com/mtravis) for testing 40 | * 2014/12/02 v.1.3: support for blank backgrounds, minor bug fixing 41 | * 2014/12/02 v.1.2: precision export support thanks to [ndawson](http://gis.stackexchange.com/users/28443/ndawson) 42 | * 2014/11/30 v.1.1: multiple basemaps 43 | * 2014/11/29 v.1.0: solved some issues with styles and cluster strategy, added hashes (thanks to https://github.com/mlevans), thanks to [tomchadwin](https://github.com/tomchadwin) for issue solving! 44 | * 2014/09/20 v.0.99b: added settings save and load, user locate and address search (thanks to [Karsten](https://github.com/k4r573n)) 45 | * 2014/09/10 v.0.99a: added warning and treatment of unsupported characters in attribute names 46 | * 2014/09/05 v.0.98: additional file for basemap entries 47 | * 2014/08/06 v.0.97: new option to create a legend. supported by [the SPC Ottawa](http://www.spcottawa.on.ca/) 48 | * 2014/08/06 v.0.961: webmap title creation option, improved layer control with pretty names with help from [tomchadwin](https://github.com/tomchadwin) and supported by [the SPC Ottawa](http://www.spcottawa.on.ca/) 49 | * 2014/07/11 v.0.96: cluster support, autohotlinking, wfs support and layer order fix with a lot of help from [tomchadwin](https://github.com/tomchadwin) 50 | * 2014/05/22 v.0.95: raster support for image overlays with thanks to https://github.com/geohacker/leaflet-opacity 51 | * 2014/05/22 v.0.9: support for styles of polygons and polylines 52 | * 2014/05/18 v.0.8.4: define your icon for point shapes, new CDN for the required javascripts 53 | * 2014/05/15 v.0.8.3: style export for graduated, single and categorized symbol point shapefiles 54 | * 2014/05/15 v.0.8.2: style export for graduated and single symbol point shapefiles. 55 | * 2014-05-03 v.0.8.1: new popup creation possibilities 56 | * 2014-05-03 v.0.8: new logo, new UI: toggle visibility 57 | * 2014-05-01 v.0.7: new layer list control for export, non-ASCII character encoding problem solved, fixed folder deletion problem, fixed problem with layer names starting with numbers 58 | * 2014-04-27 v.0.6: fixed installation issues for older python versions (thanks to [mlaloux](https://github.com/mlaloux)), enhanced list of basemap-providers (thanks to [leaflet-providers](https://github.com/leaflet/extras/leaflet-providers/)) 59 | * 2014-04-26 v.0.5: new control for full map support, optimized UI (thanks to [mtravis](https://github.com/mtravis), correct attribution for basemaps, new CSS file creation 60 | * 2014-04-25 v.0.4: new layer control for features (thanks to [RCura](https://github.com/RCura)), new GUI with extent setting possibility 61 | * 2014-04-24 v.0.3: new UI with dimension choice for webmap, enhanced HTML structure for better readability 62 | * 2014-04-23 v.0.2: added disambiguation of layer types to avoid break of loop 63 | * 2014-04-22: initial commit 64 | 65 | ## Tests 66 | 67 | You may find testdata in the "test_data" folder. 68 | It was tested on Linux Mint/Ubuntu and Windows 7 with QGIS 2.8.1 and Python 2.7.5+ 69 | 70 | ## Contributors 71 | 72 | Currently we are working on this project as part of the blog [digital-geography.com](http://www.digital-geography.com 'digital-geography'), [geolicious.](http://www.geolicious.de 'geolicious') and the [Northumberland National Park Authority](https://www.gov.uk/government/organisations/northumberland-national-park-authority 'NNPA.org.uk') 73 | You find additional contributors in the changelog. 74 | 75 | ## License 76 | 77 | ``` 78 | /*************************************************************************** 79 | * * 80 | * This program is free software; you can redistribute it and/or modify * 81 | * it under the terms of the GNU General Public License as published by * 82 | * the Free Software Foundation; either version 2 of the License, or * 83 | * (at your option) any later version. * 84 | * * 85 | ***************************************************************************/ 86 | ``` 87 | 88 | -------------------------------------------------------------------------------- /Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Geolicious/qgis2leaf/8438632797a50e601df7941b79ef79ddfe034090/Thumbs.db -------------------------------------------------------------------------------- /__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | /*************************************************************************** 4 | qgis2leaf 5 | A QGIS plugin 6 | Exports a QGIS Project to a working leaflet webmap 7 | ------------------- 8 | begin : 2014-04-20 9 | copyright : (C) 2014 by Riccardo Klinger, Geolicious 10 | email : riccardo.klinger@geolicious.de 11 | ***************************************************************************/ 12 | 13 | /*************************************************************************** 14 | * * 15 | * This program is free software; you can redistribute it and/or modify * 16 | * it under the terms of the GNU General Public License as published by * 17 | * the Free Software Foundation; either version 2 of the License, or * 18 | * (at your option) any later version. * 19 | * * 20 | ***************************************************************************/ 21 | This script initializes the plugin, making it known to QGIS. 22 | """ 23 | def name(): 24 | return "QGIS2leaf" 25 | 26 | 27 | def description(): 28 | return "QGIS to leaflet export for several layers" 29 | 30 | 31 | def version(): 32 | return "Version 0.2" 33 | 34 | 35 | def icon(): 36 | return "logo.png" 37 | 38 | 39 | def qgisMinimumVersion(): 40 | return "2.0" 41 | 42 | def author(): 43 | return "Riccardo Klinger" 44 | 45 | def email(): 46 | return "riccardo.klinger@ggeolicious.de" 47 | 48 | def classFactory(iface): 49 | # load qgis2leaf class from file qgis2leaf 50 | from qgis2leaf import qgis2leaf 51 | return qgis2leaf(iface) 52 | -------------------------------------------------------------------------------- /css/MarkerCluster.Default.css: -------------------------------------------------------------------------------- 1 | .marker-cluster-small { 2 | background-color: rgba(181, 226, 140, 0.6); 3 | } 4 | .marker-cluster-small div { 5 | background-color: rgba(110, 204, 57, 0.6); 6 | } 7 | 8 | .marker-cluster-medium { 9 | background-color: rgba(241, 211, 87, 0.6); 10 | } 11 | .marker-cluster-medium div { 12 | background-color: rgba(240, 194, 12, 0.6); 13 | } 14 | 15 | .marker-cluster-large { 16 | background-color: rgba(253, 156, 115, 0.6); 17 | } 18 | .marker-cluster-large div { 19 | background-color: rgba(241, 128, 23, 0.6); 20 | } 21 | 22 | /* IE 6-8 fallback colors */ 23 | .leaflet-oldie .marker-cluster-small { 24 | background-color: rgb(181, 226, 140); 25 | } 26 | .leaflet-oldie .marker-cluster-small div { 27 | background-color: rgb(110, 204, 57); 28 | } 29 | 30 | .leaflet-oldie .marker-cluster-medium { 31 | background-color: rgb(241, 211, 87); 32 | } 33 | .leaflet-oldie .marker-cluster-medium div { 34 | background-color: rgb(240, 194, 12); 35 | } 36 | 37 | .leaflet-oldie .marker-cluster-large { 38 | background-color: rgb(253, 156, 115); 39 | } 40 | .leaflet-oldie .marker-cluster-large div { 41 | background-color: rgb(241, 128, 23); 42 | } 43 | 44 | .marker-cluster { 45 | background-clip: padding-box; 46 | border-radius: 20px; 47 | } 48 | .marker-cluster div { 49 | width: 30px; 50 | height: 30px; 51 | margin-left: 5px; 52 | margin-top: 5px; 53 | 54 | text-align: center; 55 | border-radius: 15px; 56 | font: 12px "Helvetica Neue", Arial, Helvetica, sans-serif; 57 | } 58 | .marker-cluster span { 59 | line-height: 30px; 60 | } -------------------------------------------------------------------------------- /css/MarkerCluster.css: -------------------------------------------------------------------------------- 1 | .leaflet-cluster-anim .leaflet-marker-icon, .leaflet-cluster-anim .leaflet-marker-shadow { 2 | -webkit-transition: -webkit-transform 0.3s ease-out, opacity 0.3s ease-in; 3 | -moz-transition: -moz-transform 0.3s ease-out, opacity 0.3s ease-in; 4 | -o-transition: -o-transform 0.3s ease-out, opacity 0.3s ease-in; 5 | transition: transform 0.3s ease-out, opacity 0.3s ease-in; 6 | } 7 | -------------------------------------------------------------------------------- /css/label.css: -------------------------------------------------------------------------------- 1 | .leaflet-label { 2 | /*background: rgb(235, 235, 235); 3 | background: rgba(235, 235, 235, 0.81);*/ 4 | background-clip: padding-box; 5 | border-color: #777; 6 | border-color: rgba(0,0,0,0); 7 | border-radius: 4px; 8 | border-style: solid; 9 | border-width: 4px; 10 | color: #111; 11 | display: block; 12 | font: 12px/20px "Helvetica Neue", Arial, Helvetica, sans-serif; 13 | font-weight: bold; 14 | padding: 1px 1px; 15 | position: absolute; 16 | -webkit-user-select: none; 17 | -moz-user-select: none; 18 | -ms-user-select: none; 19 | user-select: none; 20 | pointer-events: none; 21 | white-space: nowrap; 22 | z-index: 6; 23 | } 24 | 25 | .leaflet-label.leaflet-clickable { 26 | cursor: pointer; 27 | } 28 | 29 | .leaflet-label:before, 30 | .leaflet-label:after { 31 | border-top: 6px solid transparent; 32 | border-bottom: 6px solid transparent; 33 | content: none; 34 | position: absolute; 35 | top: 5px; 36 | } 37 | 38 | .leaflet-label:before { 39 | border-right: 6px solid black; 40 | border-right-color: inherit; 41 | left: -10px; 42 | } 43 | 44 | .leaflet-label:after { 45 | border-left: 6px solid black; 46 | border-left-color: inherit; 47 | right: -10px; 48 | } 49 | 50 | .leaflet-label-right:before, 51 | .leaflet-label-left:after { 52 | content: ""; 53 | } 54 | 55 | -------------------------------------------------------------------------------- /help/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line. 5 | SPHINXOPTS = 6 | SPHINXBUILD = sphinx-build 7 | PAPER = 8 | BUILDDIR = build 9 | 10 | # Internal variables. 11 | PAPEROPT_a4 = -D latex_paper_size=a4 12 | PAPEROPT_letter = -D latex_paper_size=letter 13 | ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source 14 | 15 | .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest 16 | 17 | help: 18 | @echo "Please use \`make ' where is one of" 19 | @echo " html to make standalone HTML files" 20 | @echo " dirhtml to make HTML files named index.html in directories" 21 | @echo " singlehtml to make a single large HTML file" 22 | @echo " pickle to make pickle files" 23 | @echo " json to make JSON files" 24 | @echo " htmlhelp to make HTML files and a HTML help project" 25 | @echo " qthelp to make HTML files and a qthelp project" 26 | @echo " devhelp to make HTML files and a Devhelp project" 27 | @echo " epub to make an epub" 28 | @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" 29 | @echo " latexpdf to make LaTeX files and run them through pdflatex" 30 | @echo " text to make text files" 31 | @echo " man to make manual pages" 32 | @echo " changes to make an overview of all changed/added/deprecated items" 33 | @echo " linkcheck to check all external links for integrity" 34 | @echo " doctest to run all doctests embedded in the documentation (if enabled)" 35 | 36 | clean: 37 | -rm -rf $(BUILDDIR)/* 38 | 39 | html: 40 | $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html 41 | @echo 42 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." 43 | 44 | dirhtml: 45 | $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml 46 | @echo 47 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." 48 | 49 | singlehtml: 50 | $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml 51 | @echo 52 | @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." 53 | 54 | pickle: 55 | $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle 56 | @echo 57 | @echo "Build finished; now you can process the pickle files." 58 | 59 | json: 60 | $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json 61 | @echo 62 | @echo "Build finished; now you can process the JSON files." 63 | 64 | htmlhelp: 65 | $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp 66 | @echo 67 | @echo "Build finished; now you can run HTML Help Workshop with the" \ 68 | ".hhp project file in $(BUILDDIR)/htmlhelp." 69 | 70 | qthelp: 71 | $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp 72 | @echo 73 | @echo "Build finished; now you can run "qcollectiongenerator" with the" \ 74 | ".qhcp project file in $(BUILDDIR)/qthelp, like this:" 75 | @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/templateclass.qhcp" 76 | @echo "To view the help file:" 77 | @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/templateclass.qhc" 78 | 79 | devhelp: 80 | $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp 81 | @echo 82 | @echo "Build finished." 83 | @echo "To view the help file:" 84 | @echo "# mkdir -p $$HOME/.local/share/devhelp/templateclass" 85 | @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/templateclass" 86 | @echo "# devhelp" 87 | 88 | epub: 89 | $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub 90 | @echo 91 | @echo "Build finished. The epub file is in $(BUILDDIR)/epub." 92 | 93 | latex: 94 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 95 | @echo 96 | @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." 97 | @echo "Run \`make' in that directory to run these through (pdf)latex" \ 98 | "(use \`make latexpdf' here to do that automatically)." 99 | 100 | latexpdf: 101 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 102 | @echo "Running LaTeX files through pdflatex..." 103 | make -C $(BUILDDIR)/latex all-pdf 104 | @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." 105 | 106 | text: 107 | $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text 108 | @echo 109 | @echo "Build finished. The text files are in $(BUILDDIR)/text." 110 | 111 | man: 112 | $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man 113 | @echo 114 | @echo "Build finished. The manual pages are in $(BUILDDIR)/man." 115 | 116 | changes: 117 | $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes 118 | @echo 119 | @echo "The overview file is in $(BUILDDIR)/changes." 120 | 121 | linkcheck: 122 | $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck 123 | @echo 124 | @echo "Link check complete; look for any errors in the above output " \ 125 | "or in $(BUILDDIR)/linkcheck/output.txt." 126 | 127 | doctest: 128 | $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest 129 | @echo "Testing of doctests in the sources finished, look at the " \ 130 | "results in $(BUILDDIR)/doctest/output.txt." 131 | -------------------------------------------------------------------------------- /help/make.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | REM Command file for Sphinx documentation 4 | 5 | if "%SPHINXBUILD%" == "" ( 6 | set SPHINXBUILD=sphinx-build 7 | ) 8 | set BUILDDIR=build 9 | set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% source 10 | if NOT "%PAPER%" == "" ( 11 | set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% 12 | ) 13 | 14 | if "%1" == "" goto help 15 | 16 | if "%1" == "help" ( 17 | :help 18 | echo.Please use `make ^` where ^ is one of 19 | echo. html to make standalone HTML files 20 | echo. dirhtml to make HTML files named index.html in directories 21 | echo. singlehtml to make a single large HTML file 22 | echo. pickle to make pickle files 23 | echo. json to make JSON files 24 | echo. htmlhelp to make HTML files and a HTML help project 25 | echo. qthelp to make HTML files and a qthelp project 26 | echo. devhelp to make HTML files and a Devhelp project 27 | echo. epub to make an epub 28 | echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter 29 | echo. text to make text files 30 | echo. man to make manual pages 31 | echo. changes to make an overview over all changed/added/deprecated items 32 | echo. linkcheck to check all external links for integrity 33 | echo. doctest to run all doctests embedded in the documentation if enabled 34 | goto end 35 | ) 36 | 37 | if "%1" == "clean" ( 38 | for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i 39 | del /q /s %BUILDDIR%\* 40 | goto end 41 | ) 42 | 43 | if "%1" == "html" ( 44 | %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html 45 | echo. 46 | echo.Build finished. The HTML pages are in %BUILDDIR%/html. 47 | goto end 48 | ) 49 | 50 | if "%1" == "dirhtml" ( 51 | %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml 52 | echo. 53 | echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml. 54 | goto end 55 | ) 56 | 57 | if "%1" == "singlehtml" ( 58 | %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml 59 | echo. 60 | echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml. 61 | goto end 62 | ) 63 | 64 | if "%1" == "pickle" ( 65 | %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle 66 | echo. 67 | echo.Build finished; now you can process the pickle files. 68 | goto end 69 | ) 70 | 71 | if "%1" == "json" ( 72 | %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json 73 | echo. 74 | echo.Build finished; now you can process the JSON files. 75 | goto end 76 | ) 77 | 78 | if "%1" == "htmlhelp" ( 79 | %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp 80 | echo. 81 | echo.Build finished; now you can run HTML Help Workshop with the ^ 82 | .hhp project file in %BUILDDIR%/htmlhelp. 83 | goto end 84 | ) 85 | 86 | if "%1" == "qthelp" ( 87 | %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp 88 | echo. 89 | echo.Build finished; now you can run "qcollectiongenerator" with the ^ 90 | .qhcp project file in %BUILDDIR%/qthelp, like this: 91 | echo.^> qcollectiongenerator %BUILDDIR%\qthelp\templateclass.qhcp 92 | echo.To view the help file: 93 | echo.^> assistant -collectionFile %BUILDDIR%\qthelp\templateclass.ghc 94 | goto end 95 | ) 96 | 97 | if "%1" == "devhelp" ( 98 | %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp 99 | echo. 100 | echo.Build finished. 101 | goto end 102 | ) 103 | 104 | if "%1" == "epub" ( 105 | %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub 106 | echo. 107 | echo.Build finished. The epub file is in %BUILDDIR%/epub. 108 | goto end 109 | ) 110 | 111 | if "%1" == "latex" ( 112 | %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex 113 | echo. 114 | echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. 115 | goto end 116 | ) 117 | 118 | if "%1" == "text" ( 119 | %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text 120 | echo. 121 | echo.Build finished. The text files are in %BUILDDIR%/text. 122 | goto end 123 | ) 124 | 125 | if "%1" == "man" ( 126 | %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man 127 | echo. 128 | echo.Build finished. The manual pages are in %BUILDDIR%/man. 129 | goto end 130 | ) 131 | 132 | if "%1" == "changes" ( 133 | %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes 134 | echo. 135 | echo.The overview file is in %BUILDDIR%/changes. 136 | goto end 137 | ) 138 | 139 | if "%1" == "linkcheck" ( 140 | %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck 141 | echo. 142 | echo.Link check complete; look for any errors in the above output ^ 143 | or in %BUILDDIR%/linkcheck/output.txt. 144 | goto end 145 | ) 146 | 147 | if "%1" == "doctest" ( 148 | %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest 149 | echo. 150 | echo.Testing of doctests in the sources finished, look at the ^ 151 | results in %BUILDDIR%/doctest/output.txt. 152 | goto end 153 | ) 154 | 155 | :end 156 | -------------------------------------------------------------------------------- /help/source/conf.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # qgis2leaf documentation build configuration file, created by 4 | # sphinx-quickstart on Sun Feb 12 17:11:03 2012. 5 | # 6 | # This file is execfile()d with the current directory set to its containing dir. 7 | # 8 | # Note that not all possible configuration values are present in this 9 | # autogenerated file. 10 | # 11 | # All configuration values have a default; values that are commented out 12 | # serve to show the default. 13 | 14 | import sys, os 15 | 16 | # If extensions (or modules to document with autodoc) are in another directory, 17 | # add these directories to sys.path here. If the directory is relative to the 18 | # documentation root, use os.path.abspath to make it absolute, like shown here. 19 | #sys.path.insert(0, os.path.abspath('.')) 20 | 21 | # -- General configuration ----------------------------------------------------- 22 | 23 | # If your documentation needs a minimal Sphinx version, state it here. 24 | #needs_sphinx = '1.0' 25 | 26 | # Add any Sphinx extension module names here, as strings. They can be extensions 27 | # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. 28 | extensions = ['sphinx.ext.todo', 'sphinx.ext.pngmath', 'sphinx.ext.viewcode'] 29 | 30 | # Add any paths that contain templates here, relative to this directory. 31 | templates_path = ['_templates'] 32 | 33 | # The suffix of source filenames. 34 | source_suffix = '.rst' 35 | 36 | # The encoding of source files. 37 | #source_encoding = 'utf-8-sig' 38 | 39 | # The master toctree document. 40 | master_doc = 'index' 41 | 42 | # General information about the project. 43 | project = u'qgis2leaf' 44 | copyright = u'2013, Riccardo Klinger, Geolicious' 45 | 46 | # The version info for the project you're documenting, acts as replacement for 47 | # |version| and |release|, also used in various other places throughout the 48 | # built documents. 49 | # 50 | # The short X.Y version. 51 | version = '0.1' 52 | # The full version, including alpha/beta/rc tags. 53 | release = '0.1' 54 | 55 | # The language for content autogenerated by Sphinx. Refer to documentation 56 | # for a list of supported languages. 57 | #language = None 58 | 59 | # There are two options for replacing |today|: either, you set today to some 60 | # non-false value, then it is used: 61 | #today = '' 62 | # Else, today_fmt is used as the format for a strftime call. 63 | #today_fmt = '%B %d, %Y' 64 | 65 | # List of patterns, relative to source directory, that match files and 66 | # directories to ignore when looking for source files. 67 | exclude_patterns = [] 68 | 69 | # The reST default role (used for this markup: `text`) to use for all documents. 70 | #default_role = None 71 | 72 | # If true, '()' will be appended to :func: etc. cross-reference text. 73 | #add_function_parentheses = True 74 | 75 | # If true, the current module name will be prepended to all description 76 | # unit titles (such as .. function::). 77 | #add_module_names = True 78 | 79 | # If true, sectionauthor and moduleauthor directives will be shown in the 80 | # output. They are ignored by default. 81 | #show_authors = False 82 | 83 | # The name of the Pygments (syntax highlighting) style to use. 84 | pygments_style = 'sphinx' 85 | 86 | # A list of ignored prefixes for module index sorting. 87 | #modindex_common_prefix = [] 88 | 89 | 90 | # -- Options for HTML output --------------------------------------------------- 91 | 92 | # The theme to use for HTML and HTML Help pages. See the documentation for 93 | # a list of builtin themes. 94 | html_theme = 'default' 95 | 96 | # Theme options are theme-specific and customize the look and feel of a theme 97 | # further. For a list of options available for each theme, see the 98 | # documentation. 99 | #html_theme_options = {} 100 | 101 | # Add any paths that contain custom themes here, relative to this directory. 102 | #html_theme_path = [] 103 | 104 | # The name for this set of Sphinx documents. If None, it defaults to 105 | # " v documentation". 106 | #html_title = None 107 | 108 | # A shorter title for the navigation bar. Default is the same as html_title. 109 | #html_short_title = None 110 | 111 | # The name of an image file (relative to this directory) to place at the top 112 | # of the sidebar. 113 | #html_logo = None 114 | 115 | # The name of an image file (within the static path) to use as favicon of the 116 | # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 117 | # pixels large. 118 | #html_favicon = None 119 | 120 | # Add any paths that contain custom static files (such as style sheets) here, 121 | # relative to this directory. They are copied after the builtin static files, 122 | # so a file named "default.css" will overwrite the builtin "default.css". 123 | html_static_path = ['_static'] 124 | 125 | # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, 126 | # using the given strftime format. 127 | #html_last_updated_fmt = '%b %d, %Y' 128 | 129 | # If true, SmartyPants will be used to convert quotes and dashes to 130 | # typographically correct entities. 131 | #html_use_smartypants = True 132 | 133 | # Custom sidebar templates, maps document names to template names. 134 | #html_sidebars = {} 135 | 136 | # Additional templates that should be rendered to pages, maps page names to 137 | # template names. 138 | #html_additional_pages = {} 139 | 140 | # If false, no module index is generated. 141 | #html_domain_indices = True 142 | 143 | # If false, no index is generated. 144 | #html_use_index = True 145 | 146 | # If true, the index is split into individual pages for each letter. 147 | #html_split_index = False 148 | 149 | # If true, links to the reST sources are added to the pages. 150 | #html_show_sourcelink = True 151 | 152 | # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. 153 | #html_show_sphinx = True 154 | 155 | # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. 156 | #html_show_copyright = True 157 | 158 | # If true, an OpenSearch description file will be output, and all pages will 159 | # contain a tag referring to it. The value of this option must be the 160 | # base URL from which the finished HTML is served. 161 | #html_use_opensearch = '' 162 | 163 | # This is the file name suffix for HTML files (e.g. ".xhtml"). 164 | #html_file_suffix = None 165 | 166 | # Output file base name for HTML help builder. 167 | htmlhelp_basename = 'templateclassdoc' 168 | 169 | 170 | # -- Options for LaTeX output -------------------------------------------------- 171 | 172 | # The paper size ('letter' or 'a4'). 173 | #latex_paper_size = 'letter' 174 | 175 | # The font size ('10pt', '11pt' or '12pt'). 176 | #latex_font_size = '10pt' 177 | 178 | # Grouping the document tree into LaTeX files. List of tuples 179 | # (source start file, target name, title, author, documentclass [howto/manual]). 180 | latex_documents = [ 181 | ('index', 'qgis2leaf.tex', u'qgis2leaf Documentation', 182 | u'Riccardo Klinger, Geolicious', 'manual'), 183 | ] 184 | 185 | # The name of an image file (relative to this directory) to place at the top of 186 | # the title page. 187 | #latex_logo = None 188 | 189 | # For "manual" documents, if this is true, then toplevel headings are parts, 190 | # not chapters. 191 | #latex_use_parts = False 192 | 193 | # If true, show page references after internal links. 194 | #latex_show_pagerefs = False 195 | 196 | # If true, show URL addresses after external links. 197 | #latex_show_urls = False 198 | 199 | # Additional stuff for the LaTeX preamble. 200 | #latex_preamble = '' 201 | 202 | # Documents to append as an appendix to all manuals. 203 | #latex_appendices = [] 204 | 205 | # If false, no module index is generated. 206 | #latex_domain_indices = True 207 | 208 | 209 | # -- Options for manual page output -------------------------------------------- 210 | 211 | # One entry per manual page. List of tuples 212 | # (source start file, name, description, authors, manual section). 213 | man_pages = [ 214 | ('index', 'templateclass', u'qgis2leaf Documentation', 215 | [u'Riccardo Klinger, Geolicious'], 1) 216 | ] 217 | -------------------------------------------------------------------------------- /help/source/index.rst: -------------------------------------------------------------------------------- 1 | .. qgis2leaf documentation master file, created by 2 | sphinx-quickstart on Sun Feb 12 17:11:03 2012. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | Welcome to qgis2leaf's documentation! 7 | ============================================ 8 | 9 | Contents: 10 | 11 | .. toctree:: 12 | :maxdepth: 2 13 | 14 | Indices and tables 15 | ================== 16 | 17 | * :ref:`genindex` 18 | * :ref:`modindex` 19 | * :ref:`search` 20 | 21 | -------------------------------------------------------------------------------- /js/Autolinker.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Autolinker.js 3 | * 0.11.0 4 | * 5 | * Copyright(c) 2014 Gregory Jacobs 6 | * MIT Licensed. http://www.opensource.org/licenses/mit-license.php 7 | * 8 | * https://github.com/gregjacobs/Autolinker.js 9 | */ 10 | !function(a,b){"function"==typeof define&&define.amd?define(b):"undefined"!=typeof exports?module.exports=b():a.Autolinker=b()}(this,function(){var a=function(a){a=a||{};for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b])};return a.prototype={constructor:a,newWindow:!0,stripPrefix:!0,twitter:!0,email:!0,urls:!0,className:"",matcherRegex:function(){var a=/(^|[^\w])@(\w{1,15})/,b=/(?:[\-;:&=\+\$,\w\.]+@)/,c=/(?:[A-Za-z]{3,9}:(?:\/\/)?)/,d=/(?:www\.)/,e=/[A-Za-z0-9\.\-]*[A-Za-z0-9\-]/,f=/\.(?:international|construction|contractors|enterprises|photography|productions|foundation|immobilien|industries|management|properties|technology|christmas|community|directory|education|equipment|institute|marketing|solutions|vacations|bargains|boutique|builders|catering|cleaning|clothing|computer|democrat|diamonds|graphics|holdings|lighting|partners|plumbing|supplies|training|ventures|academy|careers|company|cruises|domains|exposed|flights|florist|gallery|guitars|holiday|kitchen|neustar|okinawa|recipes|rentals|reviews|shiksha|singles|support|systems|agency|berlin|camera|center|coffee|condos|dating|estate|events|expert|futbol|kaufen|luxury|maison|monash|museum|nagoya|photos|repair|report|social|supply|tattoo|tienda|travel|viajes|villas|vision|voting|voyage|actor|build|cards|cheap|codes|dance|email|glass|house|mango|ninja|parts|photo|shoes|solar|today|tokyo|tools|watch|works|aero|arpa|asia|best|bike|blue|buzz|camp|club|cool|coop|farm|fish|gift|guru|info|jobs|kiwi|kred|land|limo|link|menu|mobi|moda|name|pics|pink|post|qpon|rich|ruhr|sexy|tips|vote|voto|wang|wien|wiki|zone|bar|bid|biz|cab|cat|ceo|com|edu|gov|int|kim|mil|net|onl|org|pro|pub|red|tel|uno|wed|xxx|xyz|ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cw|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|za|zm|zw)\b/,g=/(?:[\-A-Za-z0-9+&@#\/%?=~_()|!:,.;]*[\-A-Za-z0-9+&@#\/%=~_()|])?/;return new RegExp(["(",a.source,")","|","(",b.source,e.source,f.source,")","|","(","(?:","(?:",c.source,e.source,")","|","(?:","(.?//)?",d.source,e.source,")","|","(?:","(.?//)?",e.source,f.source,")",")",g.source,")"].join(""),"gi")}(),protocolRelativeRegex:/(.)?\/\//,htmlRegex:function(){var a=/[0-9a-zA-Z:]+/,b=/[^\s\0"'>\/=\x01-\x1F\x7F]+/,c=/(?:".*?"|'.*?'|[^'"=<>`\s]+)/;return new RegExp(["<(/)?","("+a.source+")","(?:","\\s+",b.source,"(?:\\s*=\\s*"+c.source+")?",")*","\\s*",">"].join(""),"g")}(),urlPrefixRegex:/^(https?:\/\/)?(www\.)?/i,link:function(a){return this.processHtml(a)},processHtml:function(a){for(var b,c,d=this.htmlRegex,e=0,f=0,g=[];null!==(b=d.exec(a));){var h=b[0],i=b[2],j=!!b[1];c=a.substring(e,b.index),e=b.index+h.length,"a"===i?j?(f=Math.max(f-1,0),0===f&&g.push(c)):(f++,g.push(this.processTextNode(c))):g.push(0===f?this.processTextNode(c):c),g.push(h)}if(ex&&(a=a.substr(0,a.length-1),t=")")}var z,A=a,B=a;if(m)z="twitter",s=n,A="https://twitter.com/"+o,B="@"+o;else if(p)z="email",A="mailto:"+p,B=p;else if(z="url",r){var C=new RegExp("^"+b.protocolRelativeRegex.source),D=r.match(C)[1]||"";s=D+s,A=A.replace(C,"//"),B=B.replace(C,"")}else/^[A-Za-z]{3,9}:/i.test(A)||(A="http://"+A);var E=b.createAnchorTag(z,A,B);return s+E+t})},createAnchorTag:function(a,b,c){var d=this.createAnchorAttrsStr(a,b);return c=this.processAnchorText(c),""+c+""},createAnchorAttrsStr:function(a,b){var c=['href="'+b+'"'],d=this.createCssClass(a);return d&&c.push('class="'+d+'"'),this.newWindow&&c.push('target="_blank"'),c.join(" ")},createCssClass:function(a){var b=this.className;return b?b+" "+b+"-"+a:""},processAnchorText:function(a){return this.stripPrefix&&(a=this.stripUrlPrefix(a)),a=this.removeTrailingSlash(a),a=this.doTruncate(a)},stripUrlPrefix:function(a){return a.replace(this.urlPrefixRegex,"")},removeTrailingSlash:function(a){return"/"===a.charAt(a.length-1)&&(a=a.slice(0,-1)),a},doTruncate:function(a){var b=this.truncate;return b&&a.length>b&&(a=a.substring(0,b-2)+".."),a}},a.link=function(b,c){var d=new a(c);return d.link(b)},a}); -------------------------------------------------------------------------------- /js/label.js: -------------------------------------------------------------------------------- 1 | /* 2 | Leaflet.label, a plugin that adds labels to markers and vectors for Leaflet powered maps. 3 | (c) 2012-2013, Jacob Toye, Smartrak 4 | 5 | https://github.com/Leaflet/Leaflet.label 6 | http://leafletjs.com 7 | https://github.com/jacobtoye 8 | */ 9 | (function(){L.labelVersion="0.2.2-dev",L.Label=L.Class.extend({includes:L.Mixin.Events,options:{className:"",clickable:!1,direction:"right",noHide:!1,offset:[12,-15],opacity:1,zoomAnimation:!0},initialize:function(t,e){L.setOptions(this,t),this._source=e,this._animated=L.Browser.any3d&&this.options.zoomAnimation,this._isOpen=!1},onAdd:function(t){this._map=t,this._pane=this._source instanceof L.Marker?t._panes.markerPane:t._panes.popupPane,this._container||this._initLayout(),this._pane.appendChild(this._container),this._initInteraction(),this._update(),this.setOpacity(this.options.opacity),t.on("moveend",this._onMoveEnd,this).on("viewreset",this._onViewReset,this),this._animated&&t.on("zoomanim",this._zoomAnimation,this),L.Browser.touch&&!this.options.noHide&&L.DomEvent.on(this._container,"click",this.close,this)},onRemove:function(t){this._pane.removeChild(this._container),t.off({zoomanim:this._zoomAnimation,moveend:this._onMoveEnd,viewreset:this._onViewReset},this),this._removeInteraction(),this._map=null},setLatLng:function(t){return this._latlng=L.latLng(t),this._map&&this._updatePosition(),this},setContent:function(t){return this._previousContent=this._content,this._content=t,this._updateContent(),this},close:function(){var t=this._map;t&&(L.Browser.touch&&!this.options.noHide&&L.DomEvent.off(this._container,"click",this.close),t.removeLayer(this))},updateZIndex:function(t){this._zIndex=t,this._container&&this._zIndex&&(this._container.style.zIndex=t)},setOpacity:function(t){this.options.opacity=t,this._container&&L.DomUtil.setOpacity(this._container,t)},_initLayout:function(){this._container=L.DomUtil.create("div","leaflet-label "+this.options.className+" leaflet-zoom-animated"),this.updateZIndex(this._zIndex)},_update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updatePosition(),this._container.style.visibility="")},_updateContent:function(){this._content&&this._map&&this._prevContent!==this._content&&"string"==typeof this._content&&(this._container.innerHTML=this._content,this._prevContent=this._content,this._labelWidth=this._container.offsetWidth)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},_setPosition:function(t){var e=this._map,i=this._container,n=e.latLngToContainerPoint(e.getCenter()),o=e.layerPointToContainerPoint(t),s=this.options.direction,a=this._labelWidth,l=L.point(this.options.offset);"right"===s||"auto"===s&&o.xi;i++)L.DomEvent.on(t,e[i],this._fireMouseEvent,this)}},_removeInteraction:function(){if(this.options.clickable){var t=this._container,e=["dblclick","mousedown","mouseover","mouseout","contextmenu"];L.DomUtil.removeClass(t,"leaflet-clickable"),L.DomEvent.off(t,"click",this._onMouseClick,this);for(var i=0;e.length>i;i++)L.DomEvent.off(t,e[i],this._fireMouseEvent,this)}},_onMouseClick:function(t){this.hasEventListeners(t.type)&&L.DomEvent.stopPropagation(t),this.fire(t.type,{originalEvent:t})},_fireMouseEvent:function(t){this.fire(t.type,{originalEvent:t}),"contextmenu"===t.type&&this.hasEventListeners(t.type)&&L.DomEvent.preventDefault(t),"mousedown"!==t.type?L.DomEvent.stopPropagation(t):L.DomEvent.preventDefault(t)}}),L.BaseMarkerMethods={showLabel:function(){return this.label&&this._map&&(this.label.setLatLng(this._latlng),this._map.showLabel(this.label)),this},hideLabel:function(){return this.label&&this.label.close(),this},setLabelNoHide:function(t){this._labelNoHide!==t&&(this._labelNoHide=t,t?(this._removeLabelRevealHandlers(),this.showLabel()):(this._addLabelRevealHandlers(),this.hideLabel()))},bindLabel:function(t,e){var i=this.options.icon?this.options.icon.options.labelAnchor:this.options.labelAnchor,n=L.point(i)||L.point(0,0);return n=n.add(L.Label.prototype.options.offset),e&&e.offset&&(n=n.add(e.offset)),e=L.Util.extend({offset:n},e),this._labelNoHide=e.noHide,this.label||(this._labelNoHide||this._addLabelRevealHandlers(),this.on("remove",this.hideLabel,this).on("move",this._moveLabel,this).on("add",this._onMarkerAdd,this),this._hasLabelHandlers=!0),this.label=new L.Label(e,this).setContent(t),this},unbindLabel:function(){return this.label&&(this.hideLabel(),this.label=null,this._hasLabelHandlers&&(this._labelNoHide||this._removeLabelRevealHandlers(),this.off("remove",this.hideLabel,this).off("move",this._moveLabel,this).off("add",this._onMarkerAdd,this)),this._hasLabelHandlers=!1),this},updateLabelContent:function(t){this.label&&this.label.setContent(t)},getLabel:function(){return this.label},_onMarkerAdd:function(){this._labelNoHide&&this.showLabel()},_addLabelRevealHandlers:function(){this.on("mouseover",this.showLabel,this).on("mouseout",this.hideLabel,this),L.Browser.touch&&this.on("click",this.showLabel,this)},_removeLabelRevealHandlers:function(){this.off("mouseover",this.showLabel,this).off("mouseout",this.hideLabel,this),L.Browser.touch&&this.off("click",this.showLabel,this)},_moveLabel:function(t){this.label.setLatLng(t.latlng)}},L.Icon.Default.mergeOptions({labelAnchor:new L.Point(9,-20)}),L.Marker.mergeOptions({icon:new L.Icon.Default}),L.Marker.include(L.BaseMarkerMethods),L.Marker.include({_originalUpdateZIndex:L.Marker.prototype._updateZIndex,_updateZIndex:function(t){var e=this._zIndex+t;this._originalUpdateZIndex(t),this.label&&this.label.updateZIndex(e)},_originalSetOpacity:L.Marker.prototype.setOpacity,setOpacity:function(t,e){this.options.labelHasSemiTransparency=e,this._originalSetOpacity(t)},_originalUpdateOpacity:L.Marker.prototype._updateOpacity,_updateOpacity:function(){var t=0===this.options.opacity?0:1;this._originalUpdateOpacity(),this.label&&this.label.setOpacity(this.options.labelHasSemiTransparency?this.options.opacity:t)},_originalSetLatLng:L.Marker.prototype.setLatLng,setLatLng:function(t){return this.label&&!this._labelNoHide&&this.hideLabel(),this._originalSetLatLng(t)}}),L.CircleMarker.mergeOptions({labelAnchor:new L.Point(0,0)}),L.CircleMarker.include(L.BaseMarkerMethods),L.Path.include({bindLabel:function(t,e){return this.label&&this.label.options===e||(this.label=new L.Label(e,this)),this.label.setContent(t),this._showLabelAdded||(this.on("mouseover",this._showLabel,this).on("mousemove",this._moveLabel,this).on("mouseout remove",this._hideLabel,this),L.Browser.touch&&this.on("click",this._showLabel,this),this._showLabelAdded=!0),this},unbindLabel:function(){return this.label&&(this._hideLabel(),this.label=null,this._showLabelAdded=!1,this.off("mouseover",this._showLabel,this).off("mousemove",this._moveLabel,this).off("mouseout remove",this._hideLabel,this)),this},updateLabelContent:function(t){this.label&&this.label.setContent(t)},_showLabel:function(t){this.label.setLatLng(t.latlng),this._map.showLabel(this.label)},_moveLabel:function(t){this.label.setLatLng(t.latlng)},_hideLabel:function(){this.label.close()}}),L.Map.include({showLabel:function(t){return this.addLayer(t)}}),L.FeatureGroup.include({clearLayers:function(){return this.unbindLabel(),this.eachLayer(this.removeLayer,this),this},bindLabel:function(t,e){return this.invoke("bindLabel",t,e)},unbindLabel:function(){return this.invoke("unbindLabel")},updateLabelContent:function(t){this.invoke("updateLabelContent",t)}})})(this,document); 10 | -------------------------------------------------------------------------------- /js/leaflet-hash.js: -------------------------------------------------------------------------------- 1 | (function(window) { 2 | var HAS_HASHCHANGE = (function() { 3 | var doc_mode = window.documentMode; 4 | return ('onhashchange' in window) && 5 | (doc_mode === undefined || doc_mode > 7); 6 | })(); 7 | 8 | L.Hash = function(map) { 9 | this.onHashChange = L.Util.bind(this.onHashChange, this); 10 | 11 | if (map) { 12 | this.init(map); 13 | } 14 | }; 15 | 16 | L.Hash.parseHash = function(hash) { 17 | if(hash.indexOf('#') === 0) { 18 | hash = hash.substr(1); 19 | } 20 | var args = hash.split("/"); 21 | if (args.length == 3) { 22 | var zoom = parseInt(args[0], 10), 23 | lat = parseFloat(args[1]), 24 | lon = parseFloat(args[2]); 25 | if (isNaN(zoom) || isNaN(lat) || isNaN(lon)) { 26 | return false; 27 | } else { 28 | return { 29 | center: new L.LatLng(lat, lon), 30 | zoom: zoom 31 | }; 32 | } 33 | } else { 34 | return false; 35 | } 36 | }; 37 | 38 | L.Hash.formatHash = function(map) { 39 | var center = map.getCenter(), 40 | zoom = map.getZoom(), 41 | precision = Math.max(0, Math.ceil(Math.log(zoom) / Math.LN2)); 42 | 43 | return "#" + [zoom, 44 | center.lat.toFixed(precision), 45 | center.lng.toFixed(precision) 46 | ].join("/"); 47 | }, 48 | 49 | L.Hash.prototype = { 50 | map: null, 51 | lastHash: null, 52 | 53 | parseHash: L.Hash.parseHash, 54 | formatHash: L.Hash.formatHash, 55 | 56 | init: function(map) { 57 | this.map = map; 58 | 59 | // reset the hash 60 | this.lastHash = null; 61 | this.onHashChange(); 62 | 63 | if (!this.isListening) { 64 | this.startListening(); 65 | } 66 | }, 67 | 68 | removeFrom: function(map) { 69 | if (this.changeTimeout) { 70 | clearTimeout(this.changeTimeout); 71 | } 72 | 73 | if (this.isListening) { 74 | this.stopListening(); 75 | } 76 | 77 | this.map = null; 78 | }, 79 | 80 | onMapMove: function() { 81 | // bail if we're moving the map (updating from a hash), 82 | // or if the map is not yet loaded 83 | 84 | if (this.movingMap || !this.map._loaded) { 85 | return false; 86 | } 87 | 88 | var hash = this.formatHash(this.map); 89 | if (this.lastHash != hash) { 90 | location.replace(hash); 91 | this.lastHash = hash; 92 | } 93 | }, 94 | 95 | movingMap: false, 96 | update: function() { 97 | var hash = location.hash; 98 | if (hash === this.lastHash) { 99 | return; 100 | } 101 | var parsed = this.parseHash(hash); 102 | if (parsed) { 103 | this.movingMap = true; 104 | 105 | this.map.setView(parsed.center, parsed.zoom); 106 | 107 | this.movingMap = false; 108 | } else { 109 | this.onMapMove(this.map); 110 | } 111 | }, 112 | 113 | // defer hash change updates every 100ms 114 | changeDefer: 100, 115 | changeTimeout: null, 116 | onHashChange: function() { 117 | // throttle calls to update() so that they only happen every 118 | // `changeDefer` ms 119 | if (!this.changeTimeout) { 120 | var that = this; 121 | this.changeTimeout = setTimeout(function() { 122 | that.update(); 123 | that.changeTimeout = null; 124 | }, this.changeDefer); 125 | } 126 | }, 127 | 128 | isListening: false, 129 | hashChangeInterval: null, 130 | startListening: function() { 131 | this.map.on("moveend", this.onMapMove, this); 132 | 133 | if (HAS_HASHCHANGE) { 134 | L.DomEvent.addListener(window, "hashchange", this.onHashChange); 135 | } else { 136 | clearInterval(this.hashChangeInterval); 137 | this.hashChangeInterval = setInterval(this.onHashChange, 50); 138 | } 139 | this.isListening = true; 140 | }, 141 | 142 | stopListening: function() { 143 | this.map.off("moveend", this.onMapMove, this); 144 | 145 | if (HAS_HASHCHANGE) { 146 | L.DomEvent.removeListener(window, "hashchange", this.onHashChange); 147 | } else { 148 | clearInterval(this.hashChangeInterval); 149 | } 150 | this.isListening = false; 151 | } 152 | }; 153 | L.hash = function(map) { 154 | return new L.Hash(map); 155 | }; 156 | L.Map.prototype.addHash = function() { 157 | this._hash = L.hash(this); 158 | }; 159 | L.Map.prototype.removeHash = function() { 160 | this._hash.removeFrom(); 161 | }; 162 | })(window); 163 | -------------------------------------------------------------------------------- /js/leaflet.markercluster.js: -------------------------------------------------------------------------------- 1 | /* 2 | Leaflet.markercluster, Provides Beautiful Animated Marker Clustering functionality for Leaflet, a JS library for interactive maps. 3 | https://github.com/Leaflet/Leaflet.markercluster 4 | (c) 2012-2013, Dave Leaver, smartrak 5 | */ 6 | !function(t,e){L.MarkerClusterGroup=L.FeatureGroup.extend({options:{maxClusterRadius:80,iconCreateFunction:null,spiderfyOnMaxZoom:!0,showCoverageOnHover:!0,zoomToBoundsOnClick:!0,singleMarkerMode:!1,disableClusteringAtZoom:null,removeOutsideVisibleBounds:!0,animateAddingMarkers:!1,spiderfyDistanceMultiplier:1,chunkedLoading:!1,chunkInterval:200,chunkDelay:50,chunkProgress:null,polygonOptions:{}},initialize:function(t){L.Util.setOptions(this,t),this.options.iconCreateFunction||(this.options.iconCreateFunction=this._defaultIconCreateFunction),this._featureGroup=L.featureGroup(),this._featureGroup.on(L.FeatureGroup.EVENTS,this._propagateEvent,this),this._nonPointGroup=L.featureGroup(),this._nonPointGroup.on(L.FeatureGroup.EVENTS,this._propagateEvent,this),this._inZoomAnimation=0,this._needsClustering=[],this._needsRemoving=[],this._currentShownBounds=null,this._queue=[]},addLayer:function(t){if(t instanceof L.LayerGroup){var e=[];for(var i in t._layers)e.push(t._layers[i]);return this.addLayers(e)}if(!t.getLatLng)return this._nonPointGroup.addLayer(t),this;if(!this._map)return this._needsClustering.push(t),this;if(this.hasLayer(t))return this;this._unspiderfy&&this._unspiderfy(),this._addLayer(t,this._maxZoom);var n=t,s=this._map.getZoom();if(t.__parent)for(;n.__parent._zoom>=s;)n=n.__parent;return this._currentShownBounds.contains(n.getLatLng())&&(this.options.animateAddingMarkers?this._animationAddLayer(t,n):this._animationAddLayerNonAnimated(t,n)),this},removeLayer:function(t){if(t instanceof L.LayerGroup){var e=[];for(var i in t._layers)e.push(t._layers[i]);return this.removeLayers(e)}return t.getLatLng?this._map?t.__parent?(this._unspiderfy&&(this._unspiderfy(),this._unspiderfyLayer(t)),this._removeLayer(t,!0),this._featureGroup.hasLayer(t)&&(this._featureGroup.removeLayer(t),t.setOpacity&&t.setOpacity(1)),this):this:(!this._arraySplice(this._needsClustering,t)&&this.hasLayer(t)&&this._needsRemoving.push(t),this):(this._nonPointGroup.removeLayer(t),this)},addLayers:function(t){var e,i,n,s,r=this._featureGroup,o=this._nonPointGroup,a=this.options.chunkedLoading,h=this.options.chunkInterval,_=this.options.chunkProgress;if(this._map){var u=0,l=(new Date).getTime(),d=L.bind(function(){for(var e=(new Date).getTime();uh)break}if(s=t[u],s.getLatLng){if(!this.hasLayer(s)&&(this._addLayer(s,this._maxZoom),s.__parent&&2===s.__parent.getChildCount())){var n=s.__parent.getAllChildMarkers(),p=n[0]===s?n[1]:n[0];r.removeLayer(p)}}else o.addLayer(s)}_&&_(u,t.length,(new Date).getTime()-l),u===t.length?(this._featureGroup.eachLayer(function(t){t instanceof L.MarkerCluster&&t._iconNeedsUpdate&&t._updateIcon()}),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds)):setTimeout(d,this.options.chunkDelay)},this);d()}else{for(e=[],i=0,n=t.length;n>i;i++)s=t[i],s.getLatLng?this.hasLayer(s)||e.push(s):o.addLayer(s);this._needsClustering=this._needsClustering.concat(e)}return this},removeLayers:function(t){var e,i,n,s=this._featureGroup,r=this._nonPointGroup;if(!this._map){for(e=0,i=t.length;i>e;e++)n=t[e],this._arraySplice(this._needsClustering,n),r.removeLayer(n);return this}for(e=0,i=t.length;i>e;e++)n=t[e],n.__parent?(this._removeLayer(n,!0,!0),s.hasLayer(n)&&(s.removeLayer(n),n.setOpacity&&n.setOpacity(1))):r.removeLayer(n);return this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds),s.eachLayer(function(t){t instanceof L.MarkerCluster&&t._updateIcon()}),this},clearLayers:function(){return this._map||(this._needsClustering=[],delete this._gridClusters,delete this._gridUnclustered),this._noanimationUnspiderfy&&this._noanimationUnspiderfy(),this._featureGroup.clearLayers(),this._nonPointGroup.clearLayers(),this.eachLayer(function(t){delete t.__parent}),this._map&&this._generateInitialClusters(),this},getBounds:function(){var t=new L.LatLngBounds;this._topClusterLevel&&t.extend(this._topClusterLevel._bounds);for(var e=this._needsClustering.length-1;e>=0;e--)t.extend(this._needsClustering[e].getLatLng());return t.extend(this._nonPointGroup.getBounds()),t},eachLayer:function(t,e){var i,n=this._needsClustering.slice();for(this._topClusterLevel&&this._topClusterLevel.getAllChildMarkers(n),i=n.length-1;i>=0;i--)t.call(e,n[i]);this._nonPointGroup.eachLayer(t,e)},getLayers:function(){var t=[];return this.eachLayer(function(e){t.push(e)}),t},getLayer:function(t){var e=null;return this.eachLayer(function(i){L.stamp(i)===t&&(e=i)}),e},hasLayer:function(t){if(!t)return!1;var e,i=this._needsClustering;for(e=i.length-1;e>=0;e--)if(i[e]===t)return!0;for(i=this._needsRemoving,e=i.length-1;e>=0;e--)if(i[e]===t)return!1;return!(!t.__parent||t.__parent._group!==this)||this._nonPointGroup.hasLayer(t)},zoomToShowLayer:function(t,e){var i=function(){if((t._icon||t.__parent._icon)&&!this._inZoomAnimation)if(this._map.off("moveend",i,this),this.off("animationend",i,this),t._icon)e();else if(t.__parent._icon){var n=function(){this.off("spiderfied",n,this),e()};this.on("spiderfied",n,this),t.__parent.spiderfy()}};if(t._icon&&this._map.getBounds().contains(t.getLatLng()))e();else if(t.__parent._zoome;e++)n=this._needsRemoving[e],this._removeLayer(n,!0);this._needsRemoving=[],this._zoom=this._map.getZoom(),this._currentShownBounds=this._getExpandedVisibleBounds(),this._map.on("zoomend",this._zoomEnd,this),this._map.on("moveend",this._moveEnd,this),this._spiderfierOnAdd&&this._spiderfierOnAdd(),this._bindEvents(),i=this._needsClustering,this._needsClustering=[],this.addLayers(i)},onRemove:function(t){t.off("zoomend",this._zoomEnd,this),t.off("moveend",this._moveEnd,this),this._unbindEvents(),this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim",""),this._spiderfierOnRemove&&this._spiderfierOnRemove(),this._hideCoverage(),this._featureGroup.onRemove(t),this._nonPointGroup.onRemove(t),this._featureGroup.clearLayers(),this._map=null},getVisibleParent:function(t){for(var e=t;e&&!e._icon;)e=e.__parent;return e||null},_arraySplice:function(t,e){for(var i=t.length-1;i>=0;i--)if(t[i]===e)return t.splice(i,1),!0},_removeLayer:function(t,e,i){var n=this._gridClusters,s=this._gridUnclustered,r=this._featureGroup,o=this._map;if(e)for(var a=this._maxZoom;a>=0&&s[a].removeObject(t,o.project(t.getLatLng(),a));a--);var h,_=t.__parent,u=_._markers;for(this._arraySplice(u,t);_&&(_._childCount--,!(_._zoom<0));)e&&_._childCount<=1?(h=_._markers[0]===t?_._markers[1]:_._markers[0],n[_._zoom].removeObject(_,o.project(_._cLatLng,_._zoom)),s[_._zoom].addObject(h,o.project(h.getLatLng(),_._zoom)),this._arraySplice(_.__parent._childClusters,_),_.__parent._markers.push(h),h.__parent=_.__parent,_._icon&&(r.removeLayer(_),i||r.addLayer(h))):(_._recalculateBounds(),i&&_._icon||_._updateIcon()),_=_.__parent;delete t.__parent},_isOrIsParent:function(t,e){for(;e;){if(t===e)return!0;e=e.parentNode}return!1},_propagateEvent:function(t){if(t.layer instanceof L.MarkerCluster){if(t.originalEvent&&this._isOrIsParent(t.layer._icon,t.originalEvent.relatedTarget))return;t.type="cluster"+t.type}this.fire(t.type,t)},_defaultIconCreateFunction:function(t){var e=t.getChildCount(),i=" marker-cluster-";return i+=10>e?"small":100>e?"medium":"large",new L.DivIcon({html:"
"+e+"
",className:"marker-cluster"+i,iconSize:new L.Point(40,40)})},_bindEvents:function(){var t=this._map,e=this.options.spiderfyOnMaxZoom,i=this.options.showCoverageOnHover,n=this.options.zoomToBoundsOnClick;(e||n)&&this.on("clusterclick",this._zoomOrSpiderfy,this),i&&(this.on("clustermouseover",this._showCoverage,this),this.on("clustermouseout",this._hideCoverage,this),t.on("zoomend",this._hideCoverage,this))},_zoomOrSpiderfy:function(t){var e=this._map;e.getMaxZoom()===e.getZoom()?this.options.spiderfyOnMaxZoom&&t.layer.spiderfy():this.options.zoomToBoundsOnClick&&t.layer.zoomToBounds(),t.originalEvent&&13===t.originalEvent.keyCode&&e._container.focus()},_showCoverage:function(t){var e=this._map;this._inZoomAnimation||(this._shownPolygon&&e.removeLayer(this._shownPolygon),t.layer.getChildCount()>2&&t.layer!==this._spiderfied&&(this._shownPolygon=new L.Polygon(t.layer.getConvexHull(),this.options.polygonOptions),e.addLayer(this._shownPolygon)))},_hideCoverage:function(){this._shownPolygon&&(this._map.removeLayer(this._shownPolygon),this._shownPolygon=null)},_unbindEvents:function(){var t=this.options.spiderfyOnMaxZoom,e=this.options.showCoverageOnHover,i=this.options.zoomToBoundsOnClick,n=this._map;(t||i)&&this.off("clusterclick",this._zoomOrSpiderfy,this),e&&(this.off("clustermouseover",this._showCoverage,this),this.off("clustermouseout",this._hideCoverage,this),n.off("zoomend",this._hideCoverage,this))},_zoomEnd:function(){this._map&&(this._mergeSplitClusters(),this._zoom=this._map._zoom,this._currentShownBounds=this._getExpandedVisibleBounds())},_moveEnd:function(){if(!this._inZoomAnimation){var t=this._getExpandedVisibleBounds();this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,this._zoom,t),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._map._zoom,t),this._currentShownBounds=t}},_generateInitialClusters:function(){var t=this._map.getMaxZoom(),e=this.options.maxClusterRadius,i=e;"function"!=typeof e&&(i=function(){return e}),this.options.disableClusteringAtZoom&&(t=this.options.disableClusteringAtZoom-1),this._maxZoom=t,this._gridClusters={},this._gridUnclustered={};for(var n=t;n>=0;n--)this._gridClusters[n]=new L.DistanceGrid(i(n)),this._gridUnclustered[n]=new L.DistanceGrid(i(n));this._topClusterLevel=new L.MarkerCluster(this,-1)},_addLayer:function(t,e){var i,n,s=this._gridClusters,r=this._gridUnclustered;for(this.options.singleMarkerMode&&(t.options.icon=this.options.iconCreateFunction({getChildCount:function(){return 1},getAllChildMarkers:function(){return[t]}}));e>=0;e--){i=this._map.project(t.getLatLng(),e);var o=s[e].getNearObject(i);if(o)return o._addChild(t),t.__parent=o,void 0;if(o=r[e].getNearObject(i)){var a=o.__parent;a&&this._removeLayer(o,!1);var h=new L.MarkerCluster(this,e,o,t);s[e].addObject(h,this._map.project(h._cLatLng,e)),o.__parent=h,t.__parent=h;var _=h;for(n=e-1;n>a._zoom;n--)_=new L.MarkerCluster(this,n,_),s[n].addObject(_,this._map.project(o.getLatLng(),n));for(a._addChild(_),n=e;n>=0&&r[n].removeObject(o,this._map.project(o.getLatLng(),n));n--);return}r[e].addObject(t,i)}this._topClusterLevel._addChild(t),t.__parent=this._topClusterLevel},_enqueue:function(t){this._queue.push(t),this._queueTimeout||(this._queueTimeout=setTimeout(L.bind(this._processQueue,this),300))},_processQueue:function(){for(var t=0;tthis._map._zoom?(this._animationStart(),this._animationZoomOut(this._zoom,this._map._zoom)):this._moveEnd()},_getExpandedVisibleBounds:function(){if(!this.options.removeOutsideVisibleBounds)return this.getBounds();var t=this._map,e=t.getBounds(),i=e._southWest,n=e._northEast,s=L.Browser.mobile?0:Math.abs(i.lat-n.lat),r=L.Browser.mobile?0:Math.abs(i.lng-n.lng);return new L.LatLngBounds(new L.LatLng(i.lat-s,i.lng-r,!0),new L.LatLng(n.lat+s,n.lng+r,!0))},_animationAddLayerNonAnimated:function(t,e){if(e===t)this._featureGroup.addLayer(t);else if(2===e._childCount){e._addToMap();var i=e.getAllChildMarkers();this._featureGroup.removeLayer(i[0]),this._featureGroup.removeLayer(i[1])}else e._updateIcon()}}),L.MarkerClusterGroup.include(L.DomUtil.TRANSITION?{_animationStart:function(){this._map._mapPane.className+=" leaflet-cluster-anim",this._inZoomAnimation++},_animationEnd:function(){this._map&&(this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim","")),this._inZoomAnimation--,this.fire("animationend")},_animationZoomIn:function(t,e){var i,n=this._getExpandedVisibleBounds(),s=this._featureGroup;this._topClusterLevel._recursively(n,t,0,function(r){var o,a=r._latlng,h=r._markers;for(n.contains(a)||(a=null),r._isSingleParent()&&t+1===e?(s.removeLayer(r),r._recursivelyAddChildrenToMap(null,e,n)):(r.setOpacity(0),r._recursivelyAddChildrenToMap(a,e,n)),i=h.length-1;i>=0;i--)o=h[i],n.contains(o._latlng)||s.removeLayer(o)}),this._forceLayout(),this._topClusterLevel._recursivelyBecomeVisible(n,e),s.eachLayer(function(t){t instanceof L.MarkerCluster||!t._icon||t.setOpacity(1)}),this._topClusterLevel._recursively(n,t,e,function(t){t._recursivelyRestoreChildPositions(e)}),this._enqueue(function(){this._topClusterLevel._recursively(n,t,0,function(t){s.removeLayer(t),t.setOpacity(1)}),this._animationEnd()})},_animationZoomOut:function(t,e){this._animationZoomOutSingle(this._topClusterLevel,t-1,e),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,t,this._getExpandedVisibleBounds())},_animationZoomOutSingle:function(t,e,i){var n=this._getExpandedVisibleBounds();t._recursivelyAnimateChildrenInAndAddSelfToMap(n,e+1,i);var s=this;this._forceLayout(),t._recursivelyBecomeVisible(n,i),this._enqueue(function(){if(1===t._childCount){var r=t._markers[0];r.setLatLng(r.getLatLng()),r.setOpacity&&r.setOpacity(1)}else t._recursively(n,i,0,function(t){t._recursivelyRemoveChildrenFromMap(n,e+1)});s._animationEnd()})},_animationAddLayer:function(t,e){var i=this,n=this._featureGroup;n.addLayer(t),e!==t&&(e._childCount>2?(e._updateIcon(),this._forceLayout(),this._animationStart(),t._setPos(this._map.latLngToLayerPoint(e.getLatLng())),t.setOpacity(0),this._enqueue(function(){n.removeLayer(t),t.setOpacity(1),i._animationEnd()})):(this._forceLayout(),i._animationStart(),i._animationZoomOutSingle(e,this._map.getMaxZoom(),this._map.getZoom())))},_forceLayout:function(){L.Util.falseFn(e.body.offsetWidth)}}:{_animationStart:function(){},_animationZoomIn:function(t,e){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,t),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationZoomOut:function(t,e){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,t),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationAddLayer:function(t,e){this._animationAddLayerNonAnimated(t,e)}}),L.markerClusterGroup=function(t){return new L.MarkerClusterGroup(t)},L.MarkerCluster=L.Marker.extend({initialize:function(t,e,i,n){L.Marker.prototype.initialize.call(this,i?i._cLatLng||i.getLatLng():new L.LatLng(0,0),{icon:this}),this._group=t,this._zoom=e,this._markers=[],this._childClusters=[],this._childCount=0,this._iconNeedsUpdate=!0,this._bounds=new L.LatLngBounds,i&&this._addChild(i),n&&this._addChild(n)},getAllChildMarkers:function(t){t=t||[];for(var e=this._childClusters.length-1;e>=0;e--)this._childClusters[e].getAllChildMarkers(t);for(var i=this._markers.length-1;i>=0;i--)t.push(this._markers[i]);return t},getChildCount:function(){return this._childCount},zoomToBounds:function(){for(var t,e=this._childClusters.slice(),i=this._group._map,n=i.getBoundsZoom(this._bounds),s=this._zoom+1,r=i.getZoom();e.length>0&&n>s;){s++;var o=[];for(t=0;ts?this._group._map.setView(this._latlng,s):r>=n?this._group._map.setView(this._latlng,r+1):this._group._map.fitBounds(this._bounds)},getBounds:function(){var t=new L.LatLngBounds;return t.extend(this._bounds),t},_updateIcon:function(){this._iconNeedsUpdate=!0,this._icon&&this.setIcon(this)},createIcon:function(){return this._iconNeedsUpdate&&(this._iconObj=this._group.options.iconCreateFunction(this),this._iconNeedsUpdate=!1),this._iconObj.createIcon()},createShadow:function(){return this._iconObj.createShadow()},_addChild:function(t,e){this._iconNeedsUpdate=!0,this._expandBounds(t),t instanceof L.MarkerCluster?(e||(this._childClusters.push(t),t.__parent=this),this._childCount+=t._childCount):(e||this._markers.push(t),this._childCount++),this.__parent&&this.__parent._addChild(t,!0)},_expandBounds:function(t){var e,i=t._wLatLng||t._latlng;t instanceof L.MarkerCluster?(this._bounds.extend(t._bounds),e=t._childCount):(this._bounds.extend(i),e=1),this._cLatLng||(this._cLatLng=t._cLatLng||i);var n=this._childCount+e;this._wLatLng?(this._wLatLng.lat=(i.lat*e+this._wLatLng.lat*this._childCount)/n,this._wLatLng.lng=(i.lng*e+this._wLatLng.lng*this._childCount)/n):this._latlng=this._wLatLng=new L.LatLng(i.lat,i.lng)},_addToMap:function(t){t&&(this._backupLatlng=this._latlng,this.setLatLng(t)),this._group._featureGroup.addLayer(this)},_recursivelyAnimateChildrenIn:function(t,e,i){this._recursively(t,0,i-1,function(t){var i,n,s=t._markers;for(i=s.length-1;i>=0;i--)n=s[i],n._icon&&(n._setPos(e),n.setOpacity(0))},function(t){var i,n,s=t._childClusters;for(i=s.length-1;i>=0;i--)n=s[i],n._icon&&(n._setPos(e),n.setOpacity(0))})},_recursivelyAnimateChildrenInAndAddSelfToMap:function(t,e,i){this._recursively(t,i,0,function(n){n._recursivelyAnimateChildrenIn(t,n._group._map.latLngToLayerPoint(n.getLatLng()).round(),e),n._isSingleParent()&&e-1===i?(n.setOpacity(1),n._recursivelyRemoveChildrenFromMap(t,e)):n.setOpacity(0),n._addToMap()})},_recursivelyBecomeVisible:function(t,e){this._recursively(t,0,e,null,function(t){t.setOpacity(1)})},_recursivelyAddChildrenToMap:function(t,e,i){this._recursively(i,-1,e,function(n){if(e!==n._zoom)for(var s=n._markers.length-1;s>=0;s--){var r=n._markers[s];i.contains(r._latlng)&&(t&&(r._backupLatlng=r.getLatLng(),r.setLatLng(t),r.setOpacity&&r.setOpacity(0)),n._group._featureGroup.addLayer(r))}},function(e){e._addToMap(t)})},_recursivelyRestoreChildPositions:function(t){for(var e=this._markers.length-1;e>=0;e--){var i=this._markers[e];i._backupLatlng&&(i.setLatLng(i._backupLatlng),delete i._backupLatlng)}if(t-1===this._zoom)for(var n=this._childClusters.length-1;n>=0;n--)this._childClusters[n]._restorePosition();else for(var s=this._childClusters.length-1;s>=0;s--)this._childClusters[s]._recursivelyRestoreChildPositions(t)},_restorePosition:function(){this._backupLatlng&&(this.setLatLng(this._backupLatlng),delete this._backupLatlng)},_recursivelyRemoveChildrenFromMap:function(t,e,i){var n,s;this._recursively(t,-1,e-1,function(t){for(s=t._markers.length-1;s>=0;s--)n=t._markers[s],i&&i.contains(n._latlng)||(t._group._featureGroup.removeLayer(n),n.setOpacity&&n.setOpacity(1))},function(t){for(s=t._childClusters.length-1;s>=0;s--)n=t._childClusters[s],i&&i.contains(n._latlng)||(t._group._featureGroup.removeLayer(n),n.setOpacity&&n.setOpacity(1))})},_recursively:function(t,e,i,n,s){var r,o,a=this._childClusters,h=this._zoom;if(e>h)for(r=a.length-1;r>=0;r--)o=a[r],t.intersects(o._bounds)&&o._recursively(t,e,i,n,s);else if(n&&n(this),s&&this._zoom===i&&s(this),i>h)for(r=a.length-1;r>=0;r--)o=a[r],t.intersects(o._bounds)&&o._recursively(t,e,i,n,s)},_recalculateBounds:function(){var t,e=this._markers,i=this._childClusters;for(this._bounds=new L.LatLngBounds,delete this._wLatLng,t=e.length-1;t>=0;t--)this._expandBounds(e[t]);for(t=i.length-1;t>=0;t--)this._expandBounds(i[t])},_isSingleParent:function(){return this._childClusters.length>0&&this._childClusters[0]._childCount===this._childCount}}),L.DistanceGrid=function(t){this._cellSize=t,this._sqCellSize=t*t,this._grid={},this._objectPoint={}},L.DistanceGrid.prototype={addObject:function(t,e){var i=this._getCoord(e.x),n=this._getCoord(e.y),s=this._grid,r=s[n]=s[n]||{},o=r[i]=r[i]||[],a=L.Util.stamp(t);this._objectPoint[a]=e,o.push(t)},updateObject:function(t,e){this.removeObject(t),this.addObject(t,e)},removeObject:function(t,e){var i,n,s=this._getCoord(e.x),r=this._getCoord(e.y),o=this._grid,a=o[r]=o[r]||{},h=a[s]=a[s]||[];for(delete this._objectPoint[L.Util.stamp(t)],i=0,n=h.length;n>i;i++)if(h[i]===t)return h.splice(i,1),1===n&&delete a[s],!0},eachObject:function(t,e){var i,n,s,r,o,a,h,_=this._grid;for(i in _){o=_[i];for(n in o)for(a=o[n],s=0,r=a.length;r>s;s++)h=t.call(e,a[s]),h&&(s--,r--)}},getNearObject:function(t){var e,i,n,s,r,o,a,h,_=this._getCoord(t.x),u=this._getCoord(t.y),l=this._objectPoint,d=this._sqCellSize,p=null;for(e=u-1;u+1>=e;e++)if(s=this._grid[e])for(i=_-1;_+1>=i;i++)if(r=s[i])for(n=0,o=r.length;o>n;n++)a=r[n],h=this._sqDist(l[L.Util.stamp(a)],t),d>h&&(d=h,p=a);return p},_getCoord:function(t){return Math.floor(t/this._cellSize)},_sqDist:function(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n}},function(){L.QuickHull={getDistant:function(t,e){var i=e[1].lat-e[0].lat,n=e[0].lng-e[1].lng;return n*(t.lat-e[0].lat)+i*(t.lng-e[0].lng)},findMostDistantPointFromBaseLine:function(t,e){var i,n,s,r=0,o=null,a=[];for(i=e.length-1;i>=0;i--)n=e[i],s=this.getDistant(n,t),s>0&&(a.push(n),s>r&&(r=s,o=n));return{maxPoint:o,newPoints:a}},buildConvexHull:function(t,e){var i=[],n=this.findMostDistantPointFromBaseLine(t,e);return n.maxPoint?(i=i.concat(this.buildConvexHull([t[0],n.maxPoint],n.newPoints)),i=i.concat(this.buildConvexHull([n.maxPoint,t[1]],n.newPoints))):[t[0]]},getConvexHull:function(t){var e,i=!1,n=!1,s=null,r=null;for(e=t.length-1;e>=0;e--){var o=t[e];(i===!1||o.lat>i)&&(s=o,i=o.lat),(n===!1||o.lat=0;e--)t=i[e].getLatLng(),n.push(t);return L.QuickHull.getConvexHull(n)}}),L.MarkerCluster.include({_2PI:2*Math.PI,_circleFootSeparation:25,_circleStartAngle:Math.PI/6,_spiralFootSeparation:28,_spiralLengthStart:11,_spiralLengthFactor:5,_circleSpiralSwitchover:9,spiderfy:function(){if(this._group._spiderfied!==this&&!this._group._inZoomAnimation){var t,e=this.getAllChildMarkers(),i=this._group,n=i._map,s=n.latLngToLayerPoint(this._latlng);this._group._unspiderfy(),this._group._spiderfied=this,e.length>=this._circleSpiralSwitchover?t=this._generatePointsSpiral(e.length,s):(s.y+=10,t=this._generatePointsCircle(e.length,s)),this._animationSpiderfy(e,t)}},unspiderfy:function(t){this._group._inZoomAnimation||(this._animationUnspiderfy(t),this._group._spiderfied=null)},_generatePointsCircle:function(t,e){var i,n,s=this._group.options.spiderfyDistanceMultiplier*this._circleFootSeparation*(2+t),r=s/this._2PI,o=this._2PI/t,a=[];for(a.length=t,i=t-1;i>=0;i--)n=this._circleStartAngle+i*o,a[i]=new L.Point(e.x+r*Math.cos(n),e.y+r*Math.sin(n))._round();return a},_generatePointsSpiral:function(t,e){var i,n=this._group.options.spiderfyDistanceMultiplier*this._spiralLengthStart,s=this._group.options.spiderfyDistanceMultiplier*this._spiralFootSeparation,r=this._group.options.spiderfyDistanceMultiplier*this._spiralLengthFactor,o=0,a=[];for(a.length=t,i=t-1;i>=0;i--)o+=s/n+5e-4*i,a[i]=new L.Point(e.x+n*Math.cos(o),e.y+n*Math.sin(o))._round(),n+=this._2PI*r/o;return a},_noanimationUnspiderfy:function(){var t,e,i=this._group,n=i._map,s=i._featureGroup,r=this.getAllChildMarkers();for(this.setOpacity(1),e=r.length-1;e>=0;e--)t=r[e],s.removeLayer(t),t._preSpiderfyLatlng&&(t.setLatLng(t._preSpiderfyLatlng),delete t._preSpiderfyLatlng),t.setZIndexOffset&&t.setZIndexOffset(0),t._spiderLeg&&(n.removeLayer(t._spiderLeg),delete t._spiderLeg);i._spiderfied=null}}),L.MarkerCluster.include(L.DomUtil.TRANSITION?{SVG_ANIMATION:function(){return e.createElementNS("http://www.w3.org/2000/svg","animate").toString().indexOf("SVGAnimate")>-1}(),_animationSpiderfy:function(t,i){var n,s,r,o,a=this,h=this._group,_=h._map,u=h._featureGroup,l=_.latLngToLayerPoint(this._latlng);for(n=t.length-1;n>=0;n--)s=t[n],s.setOpacity?(s.setZIndexOffset(1e6),s.setOpacity(0),u.addLayer(s),s._setPos(l)):u.addLayer(s);h._forceLayout(),h._animationStart();var d=L.Path.SVG?0:.3,p=L.Path.SVG_NS;for(n=t.length-1;n>=0;n--)if(o=_.layerPointToLatLng(i[n]),s=t[n],s._preSpiderfyLatlng=s._latlng,s.setLatLng(o),s.setOpacity&&s.setOpacity(1),r=new L.Polyline([a._latlng,o],{weight:1.5,color:"#222",opacity:d}),_.addLayer(r),s._spiderLeg=r,L.Path.SVG&&this.SVG_ANIMATION){var c=r._path.getTotalLength();r._path.setAttribute("stroke-dasharray",c+","+c);var f=e.createElementNS(p,"animate");f.setAttribute("attributeName","stroke-dashoffset"),f.setAttribute("begin","indefinite"),f.setAttribute("from",c),f.setAttribute("to",0),f.setAttribute("dur",.25),r._path.appendChild(f),f.beginElement(),f=e.createElementNS(p,"animate"),f.setAttribute("attributeName","stroke-opacity"),f.setAttribute("attributeName","stroke-opacity"),f.setAttribute("begin","indefinite"),f.setAttribute("from",0),f.setAttribute("to",.5),f.setAttribute("dur",.25),r._path.appendChild(f),f.beginElement()}if(a.setOpacity(.3),L.Path.SVG)for(this._group._forceLayout(),n=t.length-1;n>=0;n--)s=t[n]._spiderLeg,s.options.opacity=.5,s._path.setAttribute("stroke-opacity",.5);setTimeout(function(){h._animationEnd(),h.fire("spiderfied")},200)},_animationUnspiderfy:function(t){var e,i,n,s=this._group,r=s._map,o=s._featureGroup,a=t?r._latLngToNewLayerPoint(this._latlng,t.zoom,t.center):r.latLngToLayerPoint(this._latlng),h=this.getAllChildMarkers(),_=L.Path.SVG&&this.SVG_ANIMATION;for(s._animationStart(),this.setOpacity(1),i=h.length-1;i>=0;i--)e=h[i],e._preSpiderfyLatlng&&(e.setLatLng(e._preSpiderfyLatlng),delete e._preSpiderfyLatlng,e.setOpacity?(e._setPos(a),e.setOpacity(0)):o.removeLayer(e),_&&(n=e._spiderLeg._path.childNodes[0],n.setAttribute("to",n.getAttribute("from")),n.setAttribute("from",0),n.beginElement(),n=e._spiderLeg._path.childNodes[1],n.setAttribute("from",.5),n.setAttribute("to",0),n.setAttribute("stroke-opacity",0),n.beginElement(),e._spiderLeg._path.setAttribute("stroke-opacity",0)));setTimeout(function(){var t=0;for(i=h.length-1;i>=0;i--)e=h[i],e._spiderLeg&&t++;for(i=h.length-1;i>=0;i--)e=h[i],e._spiderLeg&&(e.setOpacity&&(e.setOpacity(1),e.setZIndexOffset(0)),t>1&&o.removeLayer(e),r.removeLayer(e._spiderLeg),delete e._spiderLeg);s._animationEnd()},200)}}:{_animationSpiderfy:function(t,e){var i,n,s,r,o=this._group,a=o._map,h=o._featureGroup;for(i=t.length-1;i>=0;i--)r=a.layerPointToLatLng(e[i]),n=t[i],n._preSpiderfyLatlng=n._latlng,n.setLatLng(r),n.setZIndexOffset&&n.setZIndexOffset(1e6),h.addLayer(n),s=new L.Polyline([this._latlng,r],{weight:1.5,color:"#222"}),a.addLayer(s),n._spiderLeg=s;this.setOpacity(.3),o.fire("spiderfied")},_animationUnspiderfy:function(){this._noanimationUnspiderfy()}}),L.MarkerClusterGroup.include({_spiderfied:null,_spiderfierOnAdd:function(){this._map.on("click",this._unspiderfyWrapper,this),this._map.options.zoomAnimation&&this._map.on("zoomstart",this._unspiderfyZoomStart,this),this._map.on("zoomend",this._noanimationUnspiderfy,this),L.Path.SVG&&!L.Browser.touch&&this._map._initPathRoot()},_spiderfierOnRemove:function(){this._map.off("click",this._unspiderfyWrapper,this),this._map.off("zoomstart",this._unspiderfyZoomStart,this),this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._unspiderfy()},_unspiderfyZoomStart:function(){this._map&&this._map.on("zoomanim",this._unspiderfyZoomAnim,this)},_unspiderfyZoomAnim:function(t){L.DomUtil.hasClass(this._map._mapPane,"leaflet-touching")||(this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._unspiderfy(t))},_unspiderfyWrapper:function(){this._unspiderfy()},_unspiderfy:function(t){this._spiderfied&&this._spiderfied.unspiderfy(t)},_noanimationUnspiderfy:function(){this._spiderfied&&this._spiderfied._noanimationUnspiderfy()},_unspiderfyLayer:function(t){t._spiderLeg&&(this._featureGroup.removeLayer(t),t.setOpacity(1),t.setZIndexOffset(0),this._map.removeLayer(t._spiderLeg),delete t._spiderLeg)}})}(window,document); -------------------------------------------------------------------------------- /js/proj4leaflet.js: -------------------------------------------------------------------------------- 1 | (function (factory) { 2 | var L, proj4; 3 | if (typeof define === 'function' && define.amd) { 4 | // AMD 5 | define(['leaflet', 'proj4'], factory); 6 | } else if (typeof module !== 'undefined') { 7 | // Node/CommonJS 8 | L = require('leaflet'); 9 | proj4 = require('proj4'); 10 | module.exports = factory(L, proj4); 11 | } else { 12 | // Browser globals 13 | if (typeof window.L === 'undefined' || typeof window.proj4 === 'undefined') 14 | throw 'Leaflet and proj4 must be loaded first'; 15 | factory(window.L, window.proj4); 16 | } 17 | }(function (L, proj4) { 18 | 19 | L.Proj = {}; 20 | 21 | L.Proj._isProj4Obj = function(a) { 22 | return (typeof a.inverse !== 'undefined' && 23 | typeof a.forward !== 'undefined'); 24 | }; 25 | 26 | L.Proj.ScaleDependantTransformation = function(scaleTransforms) { 27 | this.scaleTransforms = scaleTransforms; 28 | }; 29 | 30 | L.Proj.ScaleDependantTransformation.prototype.transform = function(point, scale) { 31 | return this.scaleTransforms[scale].transform(point, scale); 32 | }; 33 | 34 | L.Proj.ScaleDependantTransformation.prototype.untransform = function(point, scale) { 35 | return this.scaleTransforms[scale].untransform(point, scale); 36 | }; 37 | 38 | L.Proj.Projection = L.Class.extend({ 39 | initialize: function(a, def) { 40 | if (L.Proj._isProj4Obj(a)) { 41 | this._proj = a; 42 | } else { 43 | var code = a; 44 | if (def) { 45 | proj4.defs(code, def); 46 | } else if (proj4.defs[code] === undefined) { 47 | var urn = code.split(':'); 48 | if (urn.length > 3) { 49 | code = urn[urn.length - 3] + ':' + urn[urn.length - 1]; 50 | } 51 | if (proj4.defs[code] === undefined) { 52 | throw 'No projection definition for code ' + code; 53 | } 54 | } 55 | this._proj = proj4(code); 56 | } 57 | }, 58 | 59 | project: function (latlng) { 60 | var point = this._proj.forward([latlng.lng, latlng.lat]); 61 | return new L.Point(point[0], point[1]); 62 | }, 63 | 64 | unproject: function (point, unbounded) { 65 | var point2 = this._proj.inverse([point.x, point.y]); 66 | return new L.LatLng(point2[1], point2[0], unbounded); 67 | } 68 | }); 69 | 70 | L.Proj.CRS = L.Class.extend({ 71 | includes: L.CRS, 72 | 73 | options: { 74 | transformation: new L.Transformation(1, 0, -1, 0) 75 | }, 76 | 77 | initialize: function(a, b, c) { 78 | var code, proj, def, options; 79 | 80 | if (L.Proj._isProj4Obj(a)) { 81 | proj = a; 82 | code = proj.srsCode; 83 | options = b || {}; 84 | 85 | this.projection = new L.Proj.Projection(proj); 86 | } else { 87 | code = a; 88 | def = b; 89 | options = c || {}; 90 | this.projection = new L.Proj.Projection(code, def); 91 | } 92 | 93 | L.Util.setOptions(this, options); 94 | this.code = code; 95 | this.transformation = this.options.transformation; 96 | 97 | if (this.options.origin) { 98 | this.transformation = 99 | new L.Transformation(1, -this.options.origin[0], 100 | -1, this.options.origin[1]); 101 | } 102 | 103 | if (this.options.scales) { 104 | this._scales = this.options.scales; 105 | } else if (this.options.resolutions) { 106 | this._scales = []; 107 | for (var i = this.options.resolutions.length - 1; i >= 0; i--) { 108 | if (this.options.resolutions[i]) { 109 | this._scales[i] = 1 / this.options.resolutions[i]; 110 | } 111 | } 112 | } 113 | }, 114 | 115 | scale: function(zoom) { 116 | var iZoom = Math.floor(zoom), 117 | baseScale, 118 | nextScale, 119 | scaleDiff, 120 | zDiff; 121 | if (zoom === iZoom) { 122 | return this._scales[zoom]; 123 | } else { 124 | // Non-integer zoom, interpolate 125 | baseScale = this._scales[iZoom]; 126 | nextScale = this._scales[iZoom + 1]; 127 | scaleDiff = nextScale - baseScale; 128 | zDiff = (zoom - iZoom); 129 | return baseScale + scaleDiff * zDiff; 130 | } 131 | }, 132 | 133 | getSize: function(zoom) { 134 | var b = this.options.bounds, 135 | s, 136 | min, 137 | max; 138 | 139 | if (b) { 140 | s = this.scale(zoom); 141 | min = this.transformation.transform(b.min, s); 142 | max = this.transformation.transform(b.max, s); 143 | return L.point(Math.abs(max.x - min.x), Math.abs(max.y - min.y)); 144 | } else { 145 | // Backwards compatibility with Leaflet < 0.7 146 | s = 256 * Math.pow(2, zoom); 147 | return L.point(s, s); 148 | } 149 | } 150 | }); 151 | 152 | L.Proj.CRS.TMS = L.Proj.CRS.extend({ 153 | options: { 154 | tileSize: 256 155 | }, 156 | 157 | initialize: function(a, b, c, d) { 158 | var code, 159 | def, 160 | proj, 161 | projectedBounds, 162 | options; 163 | 164 | if (L.Proj._isProj4Obj(a)) { 165 | proj = a; 166 | projectedBounds = b; 167 | options = c || {}; 168 | options.origin = [projectedBounds[0], projectedBounds[3]]; 169 | L.Proj.CRS.prototype.initialize.call(this, proj, options); 170 | } else { 171 | code = a; 172 | def = b; 173 | projectedBounds = c; 174 | options = d || {}; 175 | options.origin = [projectedBounds[0], projectedBounds[3]]; 176 | L.Proj.CRS.prototype.initialize.call(this, code, def, options); 177 | } 178 | 179 | this.projectedBounds = projectedBounds; 180 | 181 | this._sizes = this._calculateSizes(); 182 | }, 183 | 184 | _calculateSizes: function() { 185 | var sizes = [], 186 | crsBounds = this.projectedBounds, 187 | projectedTileSize, 188 | i, 189 | x, 190 | y; 191 | for (i = this._scales.length - 1; i >= 0; i--) { 192 | if (this._scales[i]) { 193 | projectedTileSize = this.options.tileSize / this._scales[i]; 194 | // to prevent very small rounding errors from causing us to round up, 195 | // cut any decimals after 3rd before rounding up. 196 | x = Math.ceil(parseFloat((crsBounds[2] - crsBounds[0]) / projectedTileSize).toPrecision(3)) * 197 | projectedTileSize * this._scales[i]; 198 | y = Math.ceil(parseFloat((crsBounds[3] - crsBounds[1]) / projectedTileSize).toPrecision(3)) * 199 | projectedTileSize * this._scales[i]; 200 | sizes[i] = L.point(x, y); 201 | } 202 | } 203 | 204 | return sizes; 205 | }, 206 | 207 | getSize: function(zoom) { 208 | return this._sizes[zoom]; 209 | } 210 | }); 211 | 212 | L.Proj.TileLayer = {}; 213 | 214 | // Note: deprecated and not necessary since 0.7, will be removed 215 | L.Proj.TileLayer.TMS = L.TileLayer.extend({ 216 | options: { 217 | continuousWorld: true 218 | }, 219 | 220 | initialize: function(urlTemplate, crs, options) { 221 | var boundsMatchesGrid = true, 222 | scaleTransforms, 223 | upperY, 224 | crsBounds, 225 | i; 226 | 227 | if (!(crs instanceof L.Proj.CRS.TMS)) { 228 | throw 'CRS is not L.Proj.CRS.TMS.'; 229 | } 230 | 231 | L.TileLayer.prototype.initialize.call(this, urlTemplate, options); 232 | // Enabling tms will cause Leaflet to also try to do TMS, which will 233 | // break (at least prior to 0.7.0). Actively disable it, to prevent 234 | // well-meaning users from shooting themselves in the foot. 235 | this.options.tms = false; 236 | this.crs = crs; 237 | crsBounds = this.crs.projectedBounds; 238 | 239 | // Verify grid alignment 240 | for (i = this.options.minZoom; i < this.options.maxZoom && boundsMatchesGrid; i++) { 241 | var gridHeight = (crsBounds[3] - crsBounds[1]) / 242 | this._projectedTileSize(i); 243 | boundsMatchesGrid = Math.abs(gridHeight - Math.round(gridHeight)) > 1e-3; 244 | } 245 | 246 | if (!boundsMatchesGrid) { 247 | scaleTransforms = {}; 248 | for (i = this.options.minZoom; i < this.options.maxZoom; i++) { 249 | upperY = crsBounds[1] + Math.ceil((crsBounds[3] - crsBounds[1]) / 250 | this._projectedTileSize(i)) * this._projectedTileSize(i); 251 | scaleTransforms[this.crs.scale(i)] = new L.Transformation(1, -crsBounds[0], -1, upperY); 252 | } 253 | 254 | this.crs = new L.Proj.CRS.TMS(this.crs.projection._proj, crsBounds, this.crs.options); 255 | this.crs.transformation = new L.Proj.ScaleDependantTransformation(scaleTransforms); 256 | } 257 | }, 258 | 259 | getTileUrl: function(tilePoint) { 260 | var zoom = this._map.getZoom(), 261 | gridHeight = Math.ceil( 262 | (this.crs.projectedBounds[3] - this.crs.projectedBounds[1]) / 263 | this._projectedTileSize(zoom)); 264 | 265 | return L.Util.template(this._url, L.Util.extend({ 266 | s: this._getSubdomain(tilePoint), 267 | z: this._getZoomForUrl(), 268 | x: tilePoint.x, 269 | y: gridHeight - tilePoint.y - 1 270 | }, this.options)); 271 | }, 272 | 273 | _projectedTileSize: function(zoom) { 274 | return (this.options.tileSize / this.crs.scale(zoom)); 275 | } 276 | }); 277 | 278 | L.Proj.GeoJSON = L.GeoJSON.extend({ 279 | initialize: function(geojson, options) { 280 | this._callLevel = 0; 281 | L.GeoJSON.prototype.initialize.call(this, null, options); 282 | this.addData(geojson); 283 | }, 284 | 285 | addData: function(geojson) { 286 | var crs; 287 | 288 | if (geojson) { 289 | if (geojson.crs && geojson.crs.type === 'name') { 290 | crs = new L.Proj.CRS(geojson.crs.properties.name); 291 | } else if (geojson.crs && geojson.crs.type) { 292 | crs = new L.Proj.CRS(geojson.crs.type + ':' + geojson.crs.properties.code); 293 | } 294 | 295 | if (crs !== undefined) { 296 | this.options.coordsToLatLng = function(coords) { 297 | var point = L.point(coords[0], coords[1]); 298 | return crs.projection.unproject(point); 299 | }; 300 | } 301 | } 302 | 303 | // Base class' addData might call us recursively, but 304 | // CRS shouldn't be cleared in that case, since CRS applies 305 | // to the whole GeoJSON, inluding sub-features. 306 | this._callLevel++; 307 | try { 308 | L.GeoJSON.prototype.addData.call(this, geojson); 309 | } finally { 310 | this._callLevel--; 311 | if (this._callLevel === 0) { 312 | delete this.options.coordsToLatLng; 313 | } 314 | } 315 | } 316 | }); 317 | 318 | L.Proj.geoJson = function(geojson, options) { 319 | return new L.Proj.GeoJSON(geojson, options); 320 | }; 321 | 322 | L.Proj.ImageOverlay = L.ImageOverlay.extend({ 323 | initialize: function(url, bounds, options) { 324 | L.ImageOverlay.prototype.initialize.call(this, url, null, options); 325 | this._projBounds = bounds; 326 | }, 327 | 328 | /* Danger ahead: overriding internal methods in Leaflet. 329 | I've decided to do this rather than making a copy of L.ImageOverlay 330 | and making very tiny modifications to it. Future will tell if this 331 | was wise or not. */ 332 | _animateZoom: function (e) { 333 | var northwest = L.point(this._projBounds.min.x, this._projBounds.max.y), 334 | southeast = L.point(this._projBounds.max.x, this._projBounds.min.y), 335 | topLeft = this._projectedToNewLayerPoint(northwest, e.zoom, e.center), 336 | size = this._projectedToNewLayerPoint(southeast, e.zoom, e.center).subtract(topLeft), 337 | origin = topLeft.add(size._multiplyBy((1 - 1 / e.scale) / 2)); 338 | 339 | this._image.style[L.DomUtil.TRANSFORM] = 340 | L.DomUtil.getTranslateString(origin) + ' scale(' + this._map.getZoomScale(e.zoom) + ') '; 341 | }, 342 | 343 | _reset: function() { 344 | var zoom = this._map.getZoom(), 345 | pixelOrigin = this._map.getPixelOrigin(), 346 | bounds = L.bounds(this._transform(this._projBounds.min, zoom)._subtract(pixelOrigin), 347 | this._transform(this._projBounds.max, zoom)._subtract(pixelOrigin)), 348 | size = bounds.getSize(), 349 | image = this._image; 350 | 351 | L.DomUtil.setPosition(image, bounds.min); 352 | image.style.width = size.x + 'px'; 353 | image.style.height = size.y + 'px'; 354 | }, 355 | 356 | _projectedToNewLayerPoint: function (point, newZoom, newCenter) { 357 | var topLeft = this._map._getNewTopLeftPoint(newCenter, newZoom).add(this._map._getMapPanePos()); 358 | return this._transform(point, newZoom)._subtract(topLeft); 359 | }, 360 | 361 | _transform: function(p, zoom) { 362 | var crs = this._map.options.crs, 363 | transformation = crs.transformation, 364 | scale = crs.scale(zoom); 365 | return transformation.transform(p, scale); 366 | } 367 | }); 368 | 369 | L.Proj.imageOverlay = function(url, bounds, options) { 370 | return new L.Proj.ImageOverlay(url, bounds, options); 371 | }; 372 | 373 | if (typeof L.CRS !== 'undefined') { 374 | // This is left here for backwards compatibility 375 | L.CRS.proj4js = (function () { 376 | return function (code, def, transformation, options) { 377 | options = options || {}; 378 | if (transformation) { 379 | options.transformation = transformation; 380 | } 381 | 382 | return new L.Proj.CRS(code, def, options); 383 | }; 384 | }()); 385 | } 386 | 387 | return L.Proj; 388 | })); 389 | 390 | -------------------------------------------------------------------------------- /logo_big.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Geolicious/qgis2leaf/8438632797a50e601df7941b79ef79ddfe034090/logo_big.png -------------------------------------------------------------------------------- /metadata.txt: -------------------------------------------------------------------------------- 1 | # This file contains metadata for your plugin. Beginning 2 | # with version 1.8 this is the preferred way to supply information about a 3 | # plugin. The current method of embedding metadata in __init__.py will 4 | # be supported until version 2.0 5 | 6 | # This file should be included when you package your plugin. 7 | 8 | # Mandatory items: 9 | 10 | 11 | [general] 12 | name=qgis2leaf 13 | qgisMinimumVersion=2.0 14 | description=Export your QGIS project to a leaflet based webmap. 15 | about=QGIS2Leaf creates a webmap from your current QGIS vector features and rasters. Therefore it tries to copy the current styles to styles, leaflet will understand. 16 | version=1.5.2 17 | author=Riccardo Klinger, Geolicious; Tom Chadwin, Northumberland National Park Authority 18 | email=riccardo.klinger@geolicious.de; tom.chadwin@nnpa.org.uk 19 | 20 | # end of mandatory metadata 21 | 22 | # Optional items: 23 | 24 | # Uncomment the following line and add your changelog entries: 25 | changelog= 2015/04/14 v.1.5.2 solved raster export issues, layer stacking order, and layer visibility 26 | 2015/04/14 v.1.5.1 Added https://github.com/tomchadwin to authors 27 | 2015/03/26 v.1.5.0: Major code refactor; tidy output 28 | 2015/03/17 v.1.4.2: fixed hidden polygon layers; added pen styles 29 | 2014/12/11 v.1.4.1: bugs for labels fixes. style issue for labels solved 30 | 2014/12/05 v.1.4: support for label export, embedment of remote WMS servers thanks to [tomchadwin](https://github.com/tomchadwin) and [mtravis](https://github.com/mtravis) for testing 31 | 2014/12/02 v.1.3: support for blank backgrounds, minor bug fixing 32 | 2014/12/02 v.1.2: precision export support thanks to http://gis.stackexchange.com/users/28443/ndawson) 33 | 2014/11/30 v.1.1: multiple basemaps. 34 | 2014/11/29 v.1.0: solved some issues with styles and cluster strategy, added hashes (thanks to https://github.com/mlevans), thanks to https://github.com/tomchadwin for issue solving! 35 | 2014/09/20 v.0.99b: added settings save and load, user locate and address search (thanks to https://github.com/k4r573n) 36 | 2014/09/10 v.0.99a: added warning and treatment of unsupported characters in attribute names 37 | 2014/09/05 v.0.98: additional file for basemap entries 38 | 2014/08/06 v.0.97: option for legend creation. supported by the SPC Ottawa 39 | 2014/08/06 v.0.961: webmap title creation option, improved layer control with pretty names with help from https://github.com/tomchadwin and supported by the SPC Ottawa 40 | 2014/07/11 v.0.96: support for wfs/wms, cluster strategy, autohotlinking and other great stuff due to the help of https://github.com/tomchadwin 41 | 2014/05/22 v.0.95: support for raster data as image overlays. thanks to https://github.com/geohacker/leaflet-opacity 42 | 2014/05/22 v.0.9: support for styles of polygons and polylines 43 | 2014/05/18 v.0.8.4: define your icon for point shapes, new cdn for the needed javascripts 44 | 2014/05/15 v.0.8.3: style export for graduated, single and categorized symbol point shapefiles 45 | 2014/05/15 v.0.8.2: style export for graduated and single symbol point shapefiles 46 | 2014/05/03 v.0.8.1: new popup design possibilities 47 | 2014/05/03 v.0.8: new logo, new UI: toggle visibility 48 | 2014/05/01 v.0.7: new layer list control for export, non-ascii character encoding problem solved, fixed folder deletion problem, fixed problem with layer names starting with numbers 49 | 2014/04/27 v.0.6: fixed installation issues for older python versions (thanks to https://github.com/mlaloux), enhanced list of basemap-providers (thanks to: https://github.com/leaflet-extras/leaflet-providers/) 50 | 2014/04/26 v.0.5: new control for full map support, optimized UI (thanks to https://github.com/mtravis), correct attribution for basemaps, new css file creation 51 | 2014/04/25 v.0.4: new layer control for features (thanks to https://github.com/RCura), new GUI with extent setting possibility 52 | 2014/04/24 v.0.3: new ui with dimension choice for webmap, enhanced html structure for better readability 53 | 2014/04/23 v.0.2: basemap choice, popups in leafletmap 54 | 2014/04/22 v.0.1: initial commit 55 | 56 | # tags are comma separated with spaces allowed 57 | tags=geojson, leaflet, webmap, js, html, web 58 | 59 | homepage=https://github.com/geolicious/qgis2leaf/wiki 60 | tracker=https://github.com/geolicious/qgis2leaf/issues 61 | repository=https://github.com/geolicious/qgis2leaf 62 | icon=logo_big.png 63 | # experimental flag 64 | experimental=False 65 | 66 | # deprecated flag (applies to the whole plugin, not just a single version 67 | deprecated=False 68 | -------------------------------------------------------------------------------- /plugin_upload.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # This script uploads a plugin package on the server 3 | # 4 | # Author: A. Pasotti, V. Picavet 5 | 6 | import xmlrpclib, sys, os 7 | import getpass 8 | from optparse import OptionParser 9 | 10 | # Configuration 11 | PROTOCOL='http' 12 | SERVER='plugins.qgis.org' 13 | PORT='80' 14 | ENDPOINT='/plugins/RPC2/' 15 | VERBOSE=False 16 | 17 | def main(options, args): 18 | address = "%s://%s:%s@%s:%s%s" % (PROTOCOL, options.username, options.password, 19 | options.server, options.port, ENDPOINT) 20 | print "Connecting to: %s" % hidepassword(address) 21 | 22 | server = xmlrpclib.ServerProxy(address, verbose=VERBOSE) 23 | 24 | try: 25 | plugin_id, version_id = server.plugin.upload(xmlrpclib.Binary(open(args[0]).read())) 26 | print "Plugin ID: %s" % plugin_id 27 | print "Version ID: %s" % version_id 28 | except xmlrpclib.ProtocolError, err: 29 | print "A protocol error occurred" 30 | print "URL: %s" % hidepassword(err.url, 0) 31 | print "HTTP/HTTPS headers: %s" % err.headers 32 | print "Error code: %d" % err.errcode 33 | print "Error message: %s" % err.errmsg 34 | except xmlrpclib.Fault, err: 35 | print "A fault occurred" 36 | print "Fault code: %d" % err.faultCode 37 | print "Fault string: %s" % err.faultString 38 | 39 | def hidepassword(url, start = 6): 40 | """Returns the http url with password part replaced with '*'.""" 41 | passdeb = url.find(':', start) + 1 42 | passend = url.find('@') 43 | return "%s%s%s" % (url[:passdeb], '*' * (passend - passdeb), url[passend:]) 44 | 45 | 46 | if __name__ == "__main__": 47 | parser = OptionParser(usage="%prog [options] plugin.zip") 48 | parser.add_option("-w", "--password", dest="password", 49 | help="Password for plugin site", metavar="******") 50 | parser.add_option("-u", "--username", dest="username", 51 | help="Username of plugin site", metavar="user") 52 | parser.add_option("-p", "--port", dest="port", 53 | help="Server port to connect to", metavar="80") 54 | parser.add_option("-s", "--server", dest="server", 55 | help="Specify server name", metavar="plugins.qgis.org") 56 | (options, args) = parser.parse_args() 57 | if len(args) != 1: 58 | print "Please specify zip file.\n" 59 | parser.print_help() 60 | sys.exit(1) 61 | if not options.server: 62 | options.server = SERVER 63 | if not options.port: 64 | options.port = PORT 65 | if not options.username: 66 | # interactive mode 67 | username = getpass.getuser() 68 | print "Please enter user name [%s] :"%username, 69 | res = raw_input() 70 | if res != "": 71 | options.username = res 72 | else: 73 | options.username = username 74 | if not options.password: 75 | # interactive mode 76 | options.password = getpass.getpass() 77 | main(options, args) 78 | 79 | -------------------------------------------------------------------------------- /qgis2leaf.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | /*************************************************************************** 4 | qgis2leaf 5 | A QGIS plugin 6 | Exports a QGIS Project to a working leaflet webmap 7 | ------------------- 8 | begin : 2014-04-20 9 | copyright : (C) 2014 by Riccardo Klinger, Geolicious 10 | email : riccardo.klinger@geolicious.de 11 | ***************************************************************************/ 12 | 13 | /*************************************************************************** 14 | * * 15 | * This program is free software; you can redistribute it and/or modify * 16 | * it under the terms of the GNU General Public License as published by * 17 | * the Free Software Foundation; either version 2 of the License, or * 18 | * (at your option) any later version. * 19 | * * 20 | ***************************************************************************/ 21 | """ 22 | # Import the PyQt and QGIS libraries 23 | from PyQt4.QtCore import * 24 | from PyQt4.QtGui import * 25 | from qgis.core import * 26 | # Initialize Qt resources from file resources.py 27 | import resources_rc 28 | # Import the code for the dialog 29 | from qgis2leafdialog import qgis2leafDialog 30 | import os.path 31 | 32 | 33 | class qgis2leaf: 34 | 35 | def __init__(self, iface): 36 | # Save reference to the QGIS interface 37 | self.iface = iface 38 | # initialize plugin directory 39 | self.plugin_dir = os.path.dirname(__file__) 40 | # initialize locale 41 | locale = QSettings().value("locale/userLocale")[0:2] 42 | #localePath = os.path.join(self.plugin_dir, 'i18n', 'qgis2leaf_{}.qm'.format(locale)) 43 | localePath = os.path.join(self.plugin_dir, 'i18n', 'realcentroid_{0}.qm'.format(locale)) 44 | 45 | if os.path.exists(localePath): 46 | self.translator = QTranslator() 47 | self.translator.load(localePath) 48 | 49 | if qVersion() > '4.3.3': 50 | QCoreApplication.installTranslator(self.translator) 51 | 52 | # Create the dialog (after translation) and keep reference 53 | self.dlg = qgis2leafDialog() 54 | 55 | def initGui(self): 56 | # Create action that will start plugin configuration 57 | self.action = QAction( 58 | QIcon(":/plugins/qgis2leaf/logo.png"), 59 | u"Exports a QGIS Project to a working leaflet webmap", self.iface.mainWindow()) 60 | # connect the action to the run method 61 | self.action.triggered.connect(self.run) 62 | 63 | # Add toolbar button and menu item 64 | self.iface.addToolBarIcon(self.action) 65 | self.iface.addPluginToWebMenu(u"&qgis2leaf", self.action) 66 | 67 | QObject.connect(self.dlg.ui.matchCRS,SIGNAL("stateChanged(int)"),self.changeMatchCRS) 68 | 69 | def changeMatchCRS(self,state): 70 | if (state==Qt.Checked): 71 | print "checked" 72 | self.dlg.ui.comboBox.setEnabled(False) 73 | self.dlg.ui.createcluster.setEnabled(False) 74 | else: 75 | print "unchecked" 76 | self.dlg.ui.comboBox.setEnabled(True) 77 | self.dlg.ui.createcluster.setEnabled(True) 78 | 79 | def unload(self): 80 | # Remove the plugin menu item and icon 81 | self.iface.removePluginMenu(u"&qgis2leaf", self.action) 82 | self.iface.removeToolBarIcon(self.action) 83 | 84 | # run method that performs all the real work 85 | def run(self): 86 | # show the dialog 87 | self.dlg.show() 88 | # Run the dialog event loop 89 | self.dlg.exec_() 90 | -------------------------------------------------------------------------------- /qgis2leaf_layerlist.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | /*************************************************************************** 4 | qgis2leaf @ Social Planing Council of the City of Ottawa 5 | A QGIS plugin 6 | QGIS to Leaflet creation programm 7 | ------------------- 8 | begin : 2014-04-29 9 | copyright : (C) 2013 by Riccardo Klinger 10 | email : riccardo.klinger@geolicious.com 11 | ***************************************************************************/ 12 | /*************************************************************************** 13 | INSTRUCTION ON FILE USAGE: 14 | ***************************************************************************/ 15 | """ 16 | # To add a line to the layer list you might use this dictionary python variable. 17 | # its first element is the basemap service name which will be displayed in the GUI 18 | # The second entry marked with "META" is the metadata for the leaflet. pleasy 19 | # respect copyrights and licenses 20 | # After you've added a basemap service, the plugin needs to be reinstalled. 21 | # 22 | """ 23 | /*************************************************************************** 24 | * * 25 | * This program is free software; you can redistribute it and/or modify * 26 | * it under the terms of the GNU General Public License as published by * 27 | * the Free Software Foundation; either version 3 of the License, or * 28 | * (at your option) any later version. * 29 | * * 30 | ***************************************************************************/ 31 | """ 32 | 33 | 34 | def layerlist(): 35 | dictionary = [{ 36 | 'OSM Standard':'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',\ 37 | 'META': '© OpenStreetMap contributors,CC-BY-SA' 38 | },{ 39 | 'OSM Black & White':'http://{s}.www.toolserver.org/tiles/bw-mapnik/{z}/{x}/{y}.png',\ 40 | 'META': '© OpenStreetMap contributors,CC-BY-SA' 41 | },{ 42 | 'Stamen Toner':'http://a.tile.stamen.com/toner/{z}/{x}/{y}.png',\ 43 | 'META': 'Map tiles by Stamen Design, CC BY 3.0 — Map data: © OpenStreetMap contributors,CC-BY-SA' 44 | },{ 45 | 'OSM DE':'http://{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png',\ 46 | 'META': '© OpenStreetMap contributors,CC-BY-SA' 47 | },{ 48 | 'OSM HOT':'http://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png',\ 49 | 'META': '© OpenStreetMap contributors,CC-BY-SA, Tiles courtesy of Humanitarian OpenStreetMap Team' 50 | },{ 51 | 'OpenSeaMap':'http://tiles.openseamap.org/seamark/{z}/{x}/{y}.png',\ 52 | 'META': 'Map data: © OpenSeaMap contributors' 53 | },{ 54 | 'Thunderforest Cycle':'http://{s}.tile.thunderforest.com/cycle/{z}/{x}/{y}.png',\ 55 | 'META': '© OpenCycleMap, © OpenStreetMap contributors,CC-BY-SA' 56 | },{ 57 | 'Thunderforest Transport':'http://{s}.tile.thunderforest.com/transport/{z}/{x}/{y}.png',\ 58 | 'META': '© OpenCycleMap, © OpenStreetMap contributors,CC-BY-SA' 59 | },{ 60 | 'Thunderforest Landscape':'http://{s}.tile.thunderforest.com/landscape/{z}/{x}/{y}.png',\ 61 | 'META': '© OpenCycleMap, © OpenStreetMap contributors,CC-BY-SA' 62 | },{ 63 | 'Thunderforest Outdoors':'http://{s}.tile.thunderforest.com/outdoors/{z}/{x}/{y}.png',\ 64 | 'META': '© OpenCycleMap, © OpenStreetMap contributors,CC-BY-SA' 65 | },{ 66 | 'OpenMapSurfer Roads':'http://openmapsurfer.uni-hd.de/tiles/roads/x={x}&y={y}&z={z}',\ 67 | 'META': 'Imagery from GIScience Research Group @ University of Heidelberg — Map data: © OpenStreetMap contributors,CC-BY-SA' 68 | },{ 69 | 'OpenMapSurfer adminb':'http://openmapsurfer.uni-hd.de/tiles/adminb/x={x}&y={y}&z={z}',\ 70 | 'META': 'Imagery from GIScience Research Group @ University of Heidelberg — Map data: © OpenStreetMap contributors,CC-BY-SA' 71 | },{ 72 | 'OpenMapSurfer roadsg':'http://openmapsurfer.uni-hd.de/tiles/roadsg/x={x}&y={y}&z={z}',\ 73 | 'META': 'Imagery from GIScience Research Group @ University of Heidelberg — Map data: © OpenStreetMap contributors,CC-BY-SA' 74 | },{ 75 | 'MapQuestOpen OSM':'http://otile1.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpeg',\ 76 | 'META': 'Tiles Courtesy of MapQuest — Map data: © OpenStreetMap contributors,CC-BY-SA' 77 | },{ 78 | 'MapQuestOpen Aerial':'http://otile1.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.jpg',\ 79 | 'META': 'Tiles Courtesy of MapQuest — Portions Courtesy NASA/JPL-Caltech and U.S. Depart. of Agriculture, Farm Service Agency' 80 | },{ 81 | 'Stamen Terrain':'http://a.tile.stamen.com/terrain/{z}/{x}/{y}.png',\ 82 | 'META': 'Map tiles by Stamen Design, CC BY 3.0 — Map data: © OpenStreetMap contributors,CC-BY-SA' 83 | },{ 84 | 'Stamen Watercolor':'http://a.tile.stamen.com/watercolor/{z}/{x}/{y}.png',\ 85 | 'META': 'Map tiles by Stamen Design, CC BY 3.0 — Map data: © OpenStreetMap contributors,CC-BY-SA' 86 | },{ 87 | 'OpenWeatherMap Clouds':'http://{s}.tile.openweathermap.org/map/clouds/{z}/{x}/{y}.png',\ 88 | 'META': 'Map data © OpenWeatherMap' 89 | },{ 90 | 'OpenWeatherMap Precipitation':'http://{s}.tile.openweathermap.org/map/precipitation/{z}/{x}/{y}.png',\ 91 | 'META': 'Map data © OpenWeatherMap' 92 | },{ 93 | 'OpenWeatherMap Rain':'http://{s}.tile.openweathermap.org/map/rain/{z}/{x}/{y}.png',\ 94 | 'META': 'Map data © OpenWeatherMap' 95 | },{ 96 | 'OpenWeatherMap Pressure':'http://{s}.tile.openweathermap.org/map/pressure/{z}/{x}/{y}.png',\ 97 | 'META': 'Map data © OpenWeatherMap' 98 | },{ 99 | 'OpenWeatherMap Wind':'http://{s}.tile.openweathermap.org/map/wind/{z}/{x}/{y}.png',\ 100 | 'META': 'Map data © OpenWeatherMap' 101 | },{ 102 | 'OpenWeatherMap Temp':'http://{s}.tile.openweathermap.org/map/temp/{z}/{x}/{y}.png',\ 103 | 'META': 'Map data © OpenWeatherMap' 104 | },{ 105 | 'OpenWeatherMap Snow':'http://{s}.tile.openweathermap.org/map/snow/{z}/{x}/{y}.png',\ 106 | 'META': 'Map data © OpenWeatherMap' 107 | }] 108 | return dictionary -------------------------------------------------------------------------------- /qgis2leafdialog.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | /*************************************************************************** 4 | qgis2leafDialog 5 | A QGIS plugin 6 | Exports a QGIS Project to a working leaflet webmap 7 | ------------------- 8 | begin : 2014-04-20 9 | copyright : (C) 2014 by Riccardo Klinger, Geolicious 10 | email : riccardo.klinger@geolicious.de 11 | ***************************************************************************/ 12 | 13 | /*************************************************************************** 14 | * * 15 | * This program is free software; you can redistribute it and/or modify * 16 | * it under the terms of the GNU General Public License as published by * 17 | * the Free Software Foundation; either version 2 of the License, or * 18 | * (at your option) any later version. * 19 | * * 20 | ***************************************************************************/ 21 | """ 22 | 23 | from PyQt4 import QtCore, QtGui 24 | from ui_qgis2leaf import Ui_qgis2leaf 25 | import osgeo.ogr 26 | from osgeo import ogr 27 | from qgis2leaf_exec import qgis2leaf_exec 28 | from qgis.core import * 29 | from qgis2leaf_layerlist import layerlist 30 | import qgis.utils 31 | import re 32 | import os 33 | import csv 34 | import tempfile 35 | 36 | class qgis2leafDialog(QtGui.QDialog): 37 | def __init__(self): 38 | QtGui.QDialog.__init__(self) 39 | # Set up the user interface from Designer. 40 | self.ui = Ui_qgis2leaf() 41 | self.ui.setupUi(self) 42 | 43 | self.setWindowTitle("QGIS 2 Leaflet") 44 | 45 | # Additional code 46 | self.outFileName = None 47 | self.ui.listWidget.setSelectionMode(QtGui.QAbstractItemView.ExtendedSelection) 48 | self.ui.comboBox.setSelectionMode(QtGui.QAbstractItemView.ExtendedSelection) 49 | 50 | # For now disable some features 51 | self.ui.lineEdit_2.setReadOnly(False) 52 | self.ui.okButton.setDisabled(False) 53 | self.ui.listWidget.clear() 54 | 55 | # Connect signals 56 | self.ui.cancelButton.clicked.connect(self.close) 57 | dictionary = layerlist() 58 | attrFields = [] 59 | for i in range(len(dictionary)): 60 | #print dictionary[i] 61 | for key in dictionary[i]: 62 | if key == 'META': 63 | continue 64 | else: 65 | attrFields.append(key) 66 | self.ui.comboBox.addItems(attrFields) 67 | extFields = ['canvas extent', 'layer extent'] 68 | self.ui.comboBox_2.addItems(extFields) 69 | visFields = ['show all', 'show none'] 70 | self.ui.lineEdit_2.setText(tempfile.gettempdir()) 71 | self.outFileName = self.ui.lineEdit_2.text() 72 | self.ui.comboBox_3.addItems(visFields) 73 | self.ui.pushButton_2.clicked.connect(self.showSaveDialog) 74 | #settings dialog: 75 | self.ui.lineEdit_3.setText(str(tempfile.gettempdir()) + os.sep +'settings.csv') 76 | self.SettingsFileName = self.ui.lineEdit_3.text() 77 | self.ui.lineEdit_4.setText(str(tempfile.gettempdir()) + os.sep +'settings.csv') 78 | self.SettingsFileNameLoad = self.ui.lineEdit_4.text() 79 | self.ui.pushButton_3.clicked.connect(self.showSaveDialogSettings) 80 | self.ui.pushButton_4.clicked.connect(self.showLoadDialogSettings) 81 | 82 | self.ui.okButton.clicked.connect(self.export2leaf) 83 | self.ui.okButton_2.clicked.connect(self.SaveDialogSettings) 84 | self.ui.okButton_3.clicked.connect(self.LoadDialogSettings) 85 | self.ui.getSizeButton.clicked.connect(self.getSize) 86 | self.ui.getButton.clicked.connect(self.layerGet) 87 | # set default width and height for the leaflet output 88 | self.ui.radioButton.setChecked(False) 89 | self.full_screen = 0 90 | self.width = self.ui.width_box.setText('800') 91 | self.height = self.ui.height_box.setText('600') 92 | self.ui.radioButton.toggled.connect(self.width_) 93 | if QgsProject.instance().title() != "": 94 | self.webpage_name = self.ui.webpage_name.setText(unicode(QgsProject.instance().title())) 95 | self.webmap_head = self.ui.webmap_head.setText(unicode(QgsProject.instance().title())) 96 | self.webmap_subhead = self.ui.webmap_subhead.setText(unicode(QgsProject.instance().title())) 97 | else: 98 | self.webpage_name = self.ui.webpage_name.setText("QGIS2leaf webmap") 99 | self.webmap_head = self.ui.webmap_head.setText("This is the title") 100 | self.webmap_subhead = self.ui.webmap_subhead.setText("This is the subtitle") 101 | 102 | def getSize(self): 103 | canvas = qgis.utils.iface.mapCanvas() 104 | canvasSize = canvas.size() 105 | canvasWidth = canvasSize.width() 106 | canvasHeight = canvasSize.height() 107 | self.width = self.ui.width_box.setText(str(canvasWidth)) 108 | self.height = self.ui.height_box.setText(str(canvasHeight)) 109 | def layerGet(self): 110 | self.ui.listWidget.clear() 111 | canvas = qgis.utils.iface.mapCanvas() 112 | allLayers = canvas.layers() 113 | for i in allLayers: 114 | if i.type() == 2: 115 | print(i.name() + " skipped as it is not a vector layer nor a raster layer") 116 | if i.type() == 0: 117 | #print i.type() 118 | layer_granted = 1 119 | print layer_granted 120 | fields = i.pendingFields() 121 | field_names = [field.name() for field in fields] 122 | for field in field_names: 123 | m = re.search('[ - ]|[\{-\~]|[^\x00-\x7F]|[ -/]|[=]|[@]|[<]|[>]|[[]|[]]|[\^]',field) 124 | if str(m) != "None": 125 | QtGui.QMessageBox.about(self, "Non supported attribute names detected!", "Your layer
"+ unicode(i.name()) + "
has an attribute called
" + unicode(field) + "
There are characters in the attribute name that are not allowed:
'" + unicode(m.group(0))+ "'
Consider using the table manager plugin to rename your attributes.

As it is, this layer will not be exported for the webmap.") 126 | layer_granted = 0 127 | if layer_granted == 1: 128 | self.ui.listWidget.addItem(i.name()) 129 | if i.type() == 1: 130 | self.ui.listWidget.addItem(i.name()) 131 | self.rows = self.ui.listWidget.count() 132 | self.ui.listWidget.selectAll() 133 | def width_(self): 134 | if self.ui.radioButton.isChecked() == True: 135 | self.width = self.ui.width_box.setText('') 136 | self.height = self.ui.height_box.setText('') 137 | self.full_screen = 1 138 | if self.ui.radioButton.isChecked() != True: 139 | self.width = self.ui.width_box.setText('800') 140 | self.height = self.ui.height_box.setText('600') 141 | self.full_screen = 0 142 | def showSaveDialog(self): 143 | self.outFileName = str(QtGui.QFileDialog.getExistingDirectory(self, "Output Project Name:")) 144 | if self.outFileName != None: 145 | self.ui.okButton.setDisabled(False) 146 | self.ui.lineEdit_2.clear() 147 | self.ui.lineEdit_2.setText(self.outFileName) 148 | def showLoadDialogSettings(self): 149 | self.SettingsFileNameLoad = QtGui.QFileDialog.getOpenFileName(self, 'Dialog Title', str(tempfile.gettempdir()) + os.sep + 'settings.csv', '*.csv') 150 | if self.SettingsFileNameLoad != None: 151 | self.ui.okButton_3.setDisabled(False) 152 | self.ui.lineEdit_4.clear() 153 | self.ui.lineEdit_4.setText(self.SettingsFileNameLoad) 154 | def showSaveDialogSettings(self): 155 | self.SettingsFileName = QtGui.QFileDialog.getSaveFileName(self, 'Dialog Title', str(tempfile.gettempdir()) + os.sep + 'settings.csv', '*.csv') 156 | if self.SettingsFileName != None: 157 | self.ui.okButton_2.setDisabled(False) 158 | self.ui.lineEdit_3.clear() 159 | self.ui.lineEdit_3.setText(self.SettingsFileName) 160 | # here comes the saving of the dialog 161 | def SaveDialogSettings(self): 162 | import csv 163 | my_dict = {"test": 1, "testing": 2} 164 | #here the list of arguments: 165 | #due to multiple basemaps we skip this ATM 166 | #self.basemapname = self.ui.comboBox.selectedItems() 167 | self.width = self.ui.width_box.text() 168 | self.height = self.ui.height_box.text() 169 | self.webpage_name = self.ui.webpage_name.text() 170 | self.webmap_head = self.ui.webmap_head.text() 171 | self.webmap_subhead = self.ui.webmap_subhead.text() 172 | self.extent = self.ui.comboBox_2.currentText() 173 | self.visible = self.ui.comboBox_3.currentText() 174 | self.layer_list = self.ui.listWidget.selectedItems() 175 | self.opacity = self.ui.checkBox.isChecked() 176 | self.encode2JSON = self.ui.encode2JSON.isChecked() 177 | self.createcluster = self.ui.createcluster.isChecked() 178 | self.legend = self.ui.createlegend.isChecked() 179 | self.locate = self.ui.locate.isChecked() 180 | self.address = self.ui.address.isChecked() 181 | self.precision = self.ui.spinBox.value() 182 | self.selected = self.ui.exp_selected.isChecked() 183 | #due to multiple basemaps we don't store basemaps ATM 184 | #my_settings = {"Foldername": self.outFileName, "Basemap": self.basemapname, "Width": self.width, "Height": self.height, "Extent": self.extent, "Fullscreen": self.full_screen, "Visibility": self.visible, "Opacity_Control": self.opacity, "Encoding_WFS": self.encode2JSON, "Cluster": self.createcluster, "Webpage_Name": self.webpage_name, "Webmap_Title": self.webmap_head, "Webmap_SubTitle": self.webmap_subhead, "Legend": self.legend,"Locate": self.locate, "Address": self.address} 185 | my_settings = {"Foldername": self.outFileName, "Width": self.width, "Height": self.height, "Extent": self.extent, "Fullscreen": self.full_screen, "Visibility": self.visible, "Opacity_Control": self.opacity, "Encoding_WFS": self.encode2JSON, "Cluster": self.createcluster, "Webpage_Name": self.webpage_name, "Webmap_Title": self.webmap_head, "Webmap_SubTitle": self.webmap_subhead, "Legend": self.legend,"Locate": self.locate, "Address": self.address, "precision": self.precision, "selected": self.selected} 186 | 187 | with open(str(self.ui.lineEdit_3.text()), 'wb') as f: 188 | w = csv.DictWriter(f, my_settings.keys()) 189 | w.writeheader() 190 | w.writerow(my_settings) 191 | # here comes the loading of the dialog 192 | def LoadDialogSettings(self): 193 | import csv 194 | 195 | with open(str(self.ui.lineEdit_4.text()), mode='r') as infile: 196 | reader = csv.DictReader(infile) 197 | for rows in reader: 198 | #now restore the settings by mapping the file: 199 | self.ui.lineEdit_2.setText(rows['Foldername']) 200 | #due to multiple basemaps we skip this ATM 201 | #index_basemap = self.ui.comboBox.findText(rows['Basemap']) 202 | #self.ui.comboBox.setCurrentIndex(index_basemap) 203 | self.ui.width_box.setText(rows['Width']) 204 | self.ui.height_box.setText(rows['Height']) 205 | index_extent = self.ui.comboBox_2.findText(rows['Extent']) 206 | self.ui.comboBox_2.setCurrentIndex(index_extent) 207 | print rows['Fullscreen'] 208 | if rows['Fullscreen'] == "0": 209 | print rows['Fullscreen'] 210 | self.ui.radioButton.setChecked(False) 211 | self.full_screen = 0 212 | self.width=self.ui.width_box.setText(rows['Width']) 213 | self.height=self.ui.height_box.setText(rows['Height']) 214 | if rows['Fullscreen'] == "1": 215 | print rows['Fullscreen'] 216 | self.ui.radioButton.setChecked(True) 217 | self.width = self.ui.width_box.setText('') 218 | self.height = self.ui.height_box.setText('') 219 | self.full_screen = 1 220 | index_visibility = self.ui.comboBox_3.findText(rows['Visibility']) 221 | self.ui.comboBox_3.setCurrentIndex(index_visibility) 222 | if rows["Opacity_Control"] == "False": 223 | self.ui.checkBox.setChecked(False) 224 | if rows["Opacity_Control"] == "True": 225 | self.ui.checkBox.setChecked(True) 226 | if rows["Encoding_WFS"] == "False": 227 | self.ui.encode2JSON.setChecked(False) 228 | if rows["Encoding_WFS"] == "True": 229 | self.ui.encode2JSON.setChecked(True) 230 | if rows["Cluster"] == "False": 231 | self.ui.createcluster.setChecked(False) 232 | if rows["Cluster"] == "True": 233 | self.ui.createcluster.setChecked(True) 234 | if rows["selected"] == "True": 235 | self.ui.exp_selected.setChecked(True) 236 | self.ui.webpage_name.setText(rows['Webpage_Name']) 237 | self.ui.webmap_head.setText(rows['Webmap_Title']) 238 | self.ui.webmap_subhead.setText(rows['Webmap_SubTitle']) 239 | if rows["Legend"] == "False": 240 | self.ui.createlegend.setChecked(False) 241 | if rows["Legend"] == "True": 242 | self.ui.createlegend.setChecked(True) 243 | if rows["Locate"] == "False": 244 | self.ui.locate.setChecked(False) 245 | if rows["Locate"] == "True": 246 | self.ui.locate.setChecked(True) 247 | if rows["Address"] == "False": 248 | self.ui.address.setChecked(False) 249 | if rows["Address"] == "True": 250 | self.ui.address.setChecked(True) 251 | self.ui.spinBox.setValue(int(rows['precision'])) 252 | 253 | def export2leaf(self): 254 | self.basemapName = [] 255 | self.basemapMeta = [] 256 | self.basemapAddress = [] 257 | dictionary = layerlist() 258 | for i in range(len(dictionary)): 259 | #print dictionary[i] 260 | for key in dictionary[i]: 261 | if key == 'META': 262 | continue 263 | else: 264 | for baseitem in self.ui.comboBox.selectedItems(): 265 | if baseitem.text() == key: 266 | self.basemapMeta.append(dictionary[i]['META']) 267 | print baseitem.text() 268 | self.basemapName.append(baseitem.text()) 269 | self.basemapAddress.append(dictionary[i][baseitem.text()]) 270 | 271 | self.outFileName=self.ui.lineEdit_2.text() 272 | self.width = self.ui.width_box.text() 273 | self.height = self.ui.height_box.text() 274 | self.webpage_name = self.ui.webpage_name.text() 275 | self.webmap_head = self.ui.webmap_head.text() 276 | self.webmap_subhead = self.ui.webmap_subhead.text() 277 | self.extent = self.ui.comboBox_2.currentText() 278 | self.visible = self.ui.comboBox_3.currentText() 279 | self.layer_list = self.ui.listWidget.selectedItems() 280 | self.opacity = self.ui.checkBox.isChecked() 281 | self.encode2JSON = self.ui.encode2JSON.isChecked() 282 | self.createcluster = self.ui.createcluster.isChecked() 283 | self.legend = self.ui.createlegend.isChecked() 284 | self.locate = self.ui.locate.isChecked() 285 | self.address = self.ui.address.isChecked() 286 | self.precision = self.ui.spinBox.value() 287 | self.labels = self.ui.extract_labels.isChecked() 288 | self.labelshover = self.ui.labelsonhover.isChecked() 289 | self.matchCRS = self.ui.matchCRS.isChecked() 290 | self.selected = self.ui.exp_selected.isChecked() 291 | print self.precision 292 | if self.matchCRS == True: 293 | self.createcluster = False 294 | 295 | for i in range(len(self.layer_list)): 296 | self.layer_list[i] = re.sub('[\W_]+', '', self.layer_list[i].text()) 297 | qgis2leaf_exec(self.outFileName, self.basemapName, self.basemapMeta, self.basemapAddress, self.width, self.height, self.extent, self.full_screen, self.layer_list, self.visible, self.opacity, self.encode2JSON,self.createcluster, self.webpage_name, self.webmap_head,self.webmap_subhead, self.legend,self.locate,self.address, self.precision, self.labels, self.labelshover, self.matchCRS, self.selected) 298 | self.close() 299 | -------------------------------------------------------------------------------- /resources.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # Resource object code 4 | # 5 | # Created: So. Apr 20 21:24:07 2014 6 | # by: The Resource Compiler for PyQt (Qt v4.8.4) 7 | # 8 | # WARNING! All changes made in this file will be lost! 9 | 10 | from PyQt4 import QtCore 11 | 12 | qt_resource_data = "\ 13 | \x00\x00\x04\x0a\ 14 | \x89\ 15 | \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ 16 | \x00\x00\x17\x00\x00\x00\x18\x08\x06\x00\x00\x00\x11\x7c\x66\x75\ 17 | \x00\x00\x00\x01\x73\x52\x47\x42\x00\xae\xce\x1c\xe9\x00\x00\x00\ 18 | \x06\x62\x4b\x47\x44\x00\xff\x00\xff\x00\xff\xa0\xbd\xa7\x93\x00\ 19 | \x00\x00\x09\x70\x48\x59\x73\x00\x00\x0b\x13\x00\x00\x0b\x13\x01\ 20 | \x00\x9a\x9c\x18\x00\x00\x00\x07\x74\x49\x4d\x45\x07\xd9\x02\x15\ 21 | \x16\x11\x2c\x9d\x48\x83\xbb\x00\x00\x03\x8a\x49\x44\x41\x54\x48\ 22 | \xc7\xad\x95\x4b\x68\x5c\x55\x18\xc7\x7f\xe7\xdc\x7b\x67\xe6\xce\ 23 | \x4c\x66\x26\x49\xd3\x24\x26\xa6\xc6\xf8\x40\x21\xa5\x04\xb3\x28\ 24 | \xda\x98\x20\xa5\x0b\xad\x55\xa8\x2b\xc5\x50\x1f\xa0\x6e\x34\x2b\ 25 | \x45\x30\x14\x02\xba\x52\x69\x15\x17\x66\x63\x45\x97\x95\xa0\xad\ 26 | \x0b\xfb\xc0\x06\x25\xb6\x71\x61\x12\x41\x50\xdb\x2a\x21\xd1\xe2\ 27 | \x24\xf3\x9e\xc9\xcc\xbd\xe7\x1c\x17\x35\x43\x1e\x33\x21\xb6\xfd\ 28 | \x56\x87\xf3\x9d\xfb\xfb\x1e\xf7\xff\x9d\x23\x8c\x31\x43\x95\xf4\ 29 | \x85\x1e\x3f\x3b\x35\xac\xfd\xcc\x43\xdc\xa4\x49\x3b\xfe\x9d\x1d\ 30 | \xdb\x7b\x22\x90\x78\xf8\xb2\x28\xa7\xbe\x7d\xc1\x4b\x9d\x79\xdf\ 31 | \x18\x15\xe5\x16\x99\x10\x56\xde\x69\xdc\x3f\x22\xfd\xec\xd4\xf0\ 32 | \xad\x04\x03\x18\xa3\xa2\x7e\x76\x6a\x58\xde\x68\x2b\xb4\x36\xf8\ 33 | \xbe\xc6\x18\x53\xdb\xef\xe7\xfa\xec\xed\x67\x63\x10\x42\x00\xf0\ 34 | \xfb\xd5\x65\x2a\x15\x45\xc7\x6d\x0d\x00\xc4\xa2\xc1\xaa\x6f\x0d\ 35 | \x3e\x6c\xab\xc2\x1c\x56\xa4\x77\x4b\xb0\xf2\x35\x15\x5f\x21\x85\ 36 | \xe0\xc8\x6b\x5f\x92\x2d\x37\x33\x39\xf9\x03\x27\x8e\x1f\xa2\xf7\ 37 | \xbe\x9d\x04\x1c\x0b\x37\xe4\xac\xff\xa6\x30\x87\xbd\xba\x00\x6a\ 38 | \x06\x79\xe5\xf5\xaf\x89\xd9\x92\xc5\xcc\x0a\xd9\x7c\x19\xcf\xe9\ 39 | \xe2\xe4\xa9\x2f\x78\x7c\xff\x01\x72\x85\x0a\x2b\x65\x1f\xa5\x4c\ 40 | \xb5\xb2\x55\x16\x80\xbd\x31\xda\xda\x20\x1f\x7d\x3e\xcd\xc2\xfd\ 41 | \x59\xa6\x93\x39\x92\xd1\x22\xea\x9b\x16\xce\x9d\x3f\xce\xe0\x83\ 42 | \x03\x24\x82\x59\x3a\xdb\x7b\x88\xc7\x82\x68\x63\x58\xc9\xcc\x62\ 43 | \x8c\x21\x18\xb0\x6a\xc3\x37\x06\x49\x16\xff\x24\x6b\xa5\x49\xbb\ 44 | \x25\xbc\xa2\xa6\x21\xbb\x40\x7f\xdf\x00\x83\xbd\x01\x8e\x3c\xd5\ 45 | \x45\xd7\x8e\x6b\x9c\x9c\x98\x25\x1a\xb6\xe8\xbe\x3d\xc2\xdd\x77\ 46 | \x44\x48\xc4\x1c\x22\xe1\xeb\x58\x59\xaf\xcf\xd3\x33\x29\x2e\x34\ 47 | \x2d\x91\x93\x3e\xbe\x34\x78\x01\xc5\xe2\x61\xc5\xae\x72\x8e\x70\ 48 | \xc8\xc2\x0d\x5a\xbc\xf5\xee\x2f\x9c\xfa\x3e\x86\x69\x7a\x8e\xcf\ 49 | \x26\xe6\xf9\x63\xa1\x44\xa1\xa4\xd0\xda\x6c\x0d\x2f\x15\x7c\xb4\ 50 | \x67\x28\x59\x0a\xcf\xd6\x54\xe2\x06\x13\x87\x2b\x6f\x68\xa6\x27\ 51 | \xaf\x31\x32\x36\xc7\xb2\x7f\x17\xef\x7d\x7c\x8c\x33\x67\xcf\x12\ 52 | \x70\x24\x4a\x69\xd6\x6a\x46\xd6\xd3\x70\x72\xa9\x82\x67\x34\x45\ 53 | \xad\x28\xdb\x1a\x15\x34\x98\xff\x46\xed\xef\x37\x0d\x99\xbf\x4a\ 54 | \x3c\x30\x38\xc0\xc8\x4b\xaf\x92\x5a\x9c\xe2\xe0\x23\x6d\x74\xb4\ 55 | \xba\x84\x5d\x0b\x29\x45\x7d\xb8\x94\x82\x96\xb6\x10\xf3\xc5\x12\ 56 | \x2a\xef\x53\x11\x1a\x63\xad\x3f\x93\x19\x85\xf1\xb1\x77\x58\x5a\ 57 | \xf8\x99\x97\x9f\xe9\xa6\x75\x47\x90\xc6\xb8\x43\xd8\xb5\xb6\xce\ 58 | \xfc\xfa\xfd\x00\xfb\x3e\xf4\xc8\x05\x35\xba\x5e\xeb\x46\x21\xf9\ 59 | \xcf\x0a\xa9\x8c\x87\xe3\x48\xdc\x90\xb5\x6e\x98\x6a\xaa\x65\xf2\ 60 | \x52\x92\x43\x2f\x5e\xc2\x8c\x02\x1a\x10\xf5\x07\xac\xc3\x75\x70\ 61 | \x83\x92\x80\xb3\xf9\xd0\x26\xf8\x8f\xb3\x29\xc6\x3e\xb8\x8c\x19\ 62 | \x35\x75\x6b\x7b\x7e\x3c\xca\x45\x0c\x7e\x49\x31\xf4\x58\x3b\xf7\ 63 | \xf6\x34\x90\x88\x39\x04\x1c\x59\x1f\xfe\xdb\xd5\x3c\x5f\x9d\x4b\ 64 | \x32\xfd\x44\xb2\xba\xd7\xfa\xb6\x60\xcf\xde\x16\xdc\x90\x45\x4c\ 65 | \x4a\x2a\x9e\x62\xfe\x4e\xc5\xc8\xc1\x4e\xda\x76\x86\xe8\xe9\x0a\ 66 | \xe3\xd8\x92\x58\xd4\xc6\xb2\x44\x6d\x78\x2a\x53\xe1\xca\x7c\x99\ 67 | \x63\x5d\xbf\x56\x9d\xbd\x9f\x44\x18\x7a\xba\x95\x27\x0f\xb4\xd3\ 68 | \xdc\x18\xc0\xf3\x0d\x52\x40\xd8\xb5\xb0\xa4\x20\x14\xb2\x70\x6c\ 69 | \x81\x63\xcb\xaa\x42\xd6\xfd\xb7\xf4\xec\xa3\x06\xa0\x50\x52\xd8\ 70 | \x4e\x1b\x7e\x4a\xd3\x31\xf9\x29\xcf\xfe\xd4\x49\x7f\x5f\x13\xfb\ 71 | \xfa\x9b\x71\x43\x92\x58\xd4\x21\x18\x90\xac\xde\xb0\x42\x50\x13\ 72 | \x58\x33\xf3\x88\x6b\xa1\xfd\x65\x96\xf2\x79\xc6\x43\x7b\xd8\x75\ 73 | \x38\xcc\x3d\xdd\xd1\xaa\xcf\x71\xe4\xff\x7f\x91\x56\x33\xaf\xea\ 74 | \x37\xe7\xa1\x94\x21\x16\xb5\xd1\x06\x2c\x29\x36\xf5\x72\x9b\x96\ 75 | \x95\xc0\xc4\xda\x9d\x78\x83\x43\x53\x22\x80\x65\x09\x1c\xfb\x86\ 76 | \xc1\x00\xe7\x25\x70\x14\x48\x6f\x1e\x22\x51\xe3\x75\xd9\xb6\xa5\ 77 | \x81\xa3\x32\xb1\xfb\xf4\x0c\x30\xb8\xb1\x82\x9b\xb0\x09\x60\x30\ 78 | \xb1\xfb\xf4\xcc\xbf\xa0\xe9\x6e\xae\x5a\xdf\x4b\x81\x00\x00\x00\ 79 | \x00\x49\x45\x4e\x44\xae\x42\x60\x82\ 80 | " 81 | 82 | qt_resource_name = "\ 83 | \x00\x07\ 84 | \x07\x3b\xe0\xb3\ 85 | \x00\x70\ 86 | \x00\x6c\x00\x75\x00\x67\x00\x69\x00\x6e\x00\x73\ 87 | \x00\x09\ 88 | \x00\x69\xc4\xb6\ 89 | \x00\x71\ 90 | \x00\x67\x00\x69\x00\x73\x00\x32\x00\x6c\x00\x65\x00\x61\x00\x66\ 91 | \x00\x08\ 92 | \x0a\x61\x5a\xa7\ 93 | \x00\x69\ 94 | \x00\x63\x00\x6f\x00\x6e\x00\x2e\x00\x70\x00\x6e\x00\x67\ 95 | " 96 | 97 | qt_resource_struct = "\ 98 | \x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x01\ 99 | \x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x02\ 100 | \x00\x00\x00\x14\x00\x02\x00\x00\x00\x01\x00\x00\x00\x03\ 101 | \x00\x00\x00\x2c\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\ 102 | " 103 | 104 | def qInitResources(): 105 | QtCore.qRegisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data) 106 | 107 | def qCleanupResources(): 108 | QtCore.qUnregisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data) 109 | 110 | qInitResources() 111 | -------------------------------------------------------------------------------- /resources.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | logo.png 4 | 5 | 6 | -------------------------------------------------------------------------------- /resources_rc.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # Resource object code 4 | # 5 | # Created: Mi. Apr 23 20:42:44 2014 6 | # by: The Resource Compiler for PyQt (Qt v4.8.4) 7 | # 8 | # WARNING! All changes made in this file will be lost! 9 | 10 | from PyQt4 import QtCore 11 | 12 | qt_resource_data = "\ 13 | \x00\x00\x05\x90\ 14 | \x89\ 15 | \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ 16 | \x00\x00\x17\x00\x00\x00\x17\x08\x06\x00\x00\x00\xe0\x2a\xd4\xa0\ 17 | \x00\x00\x00\x06\x62\x4b\x47\x44\x00\xff\x00\xff\x00\xff\xa0\xbd\ 18 | \xa7\x93\x00\x00\x00\x09\x70\x48\x59\x73\x00\x00\x0b\x13\x00\x00\ 19 | \x0b\x13\x01\x00\x9a\x9c\x18\x00\x00\x00\x07\x74\x49\x4d\x45\x07\ 20 | \xde\x04\x17\x11\x2d\x0a\x01\xb5\x64\xaf\x00\x00\x00\x19\x74\x45\ 21 | \x58\x74\x43\x6f\x6d\x6d\x65\x6e\x74\x00\x43\x72\x65\x61\x74\x65\ 22 | \x64\x20\x77\x69\x74\x68\x20\x47\x49\x4d\x50\x57\x81\x0e\x17\x00\ 23 | \x00\x04\xf8\x49\x44\x41\x54\x48\xc7\xa5\x95\x5b\x8c\x5d\x55\x19\ 24 | \xc7\x7f\xdf\xda\xe7\xec\x73\xbf\xb4\x3d\x9d\xe9\x94\xcb\x0c\x6d\ 25 | \x13\xda\x62\x3a\xc0\x50\x6e\x0d\x90\xd0\x54\xa2\x01\x22\xd6\xc4\ 26 | \x16\x8d\xd1\x80\x0f\x12\x42\x48\x78\x20\x21\xf8\xe2\x83\x86\xa0\ 27 | \x3e\x35\xd6\x07\x03\xc1\x44\x08\x9a\x8a\xa6\x12\x52\x5b\x42\x49\ 28 | \x35\xc5\x10\x53\x3b\x9d\x52\x4b\x83\x80\xd3\xe9\x39\x73\x39\xfb\ 29 | \xcc\x99\xc3\x9c\xcb\x3e\x7b\xad\xcf\x87\x7d\x86\x61\x34\x6a\xa2\ 30 | \xdf\xe3\x5a\xeb\xfb\xad\xff\xfa\x6e\x0b\xfd\x3f\xad\xd3\x6f\xeb\ 31 | \xdb\xd3\x27\xf4\xa9\xdf\x3d\xa6\x4b\x8d\xa5\x35\x7b\x09\xfe\x47\ 32 | \xab\x2e\x5f\xe1\x8f\x33\x27\x79\x71\xea\xa7\x1c\x3b\x7f\x8a\x2f\ 33 | \x66\xf7\x51\xdd\x5a\xa5\x50\x2e\x7c\x7a\xe6\xbf\xc3\x15\xa2\x08\ 34 | \x54\xc1\x18\xf0\x12\xf0\xd6\xf4\xef\xf9\xee\x1f\x9e\x62\x6a\x7e\ 35 | \x0a\x8d\x20\xd1\x84\xeb\x2a\x5b\x29\x14\x0b\x6b\x5c\xff\x2d\x3c\ 36 | \xea\xc3\x5c\xfd\x02\x21\xa7\x71\x4c\xa3\x44\x44\xe1\x3a\x5c\x6f\ 37 | \x3b\x3b\xf3\xbb\xf9\xfc\xa6\x07\x39\xbf\x30\x85\x09\x3c\xfa\xa1\ 38 | \xe5\xa6\xe1\xdd\x94\x4a\xc5\xff\x0c\x57\x55\x9a\xad\xcb\x34\x3a\ 39 | \xaf\xe2\x17\x26\x59\x0e\x0c\xa7\x8f\xef\x60\xc3\xfa\x31\x76\xdd\ 40 | \x3e\x49\x69\xf8\x6d\xae\x54\x4f\x70\xf4\xa3\x5f\x22\x0d\x0f\xaf\ 41 | \x9b\xa0\xe4\x0b\xc5\x5c\x09\x3f\x95\xc6\x6a\x0f\x23\x09\x04\xef\ 42 | \x5f\xe1\x8d\xe6\xfb\xb4\xec\x0b\xf8\xf9\x1a\x9e\xf1\xf9\xcb\xe9\ 43 | \x32\xfb\xee\xfd\x06\xa3\xa3\x23\x4c\x9e\xdf\x48\x2e\x3f\xc9\xcb\ 44 | \x33\xbf\xa2\x1a\xcc\x52\x89\xb2\x1c\xbc\xfe\x09\x16\x93\x01\x23\ 45 | \x1b\x36\x11\xd8\xb3\xcc\x2e\xbf\xcb\x58\xee\x0b\x14\x12\xd7\xae\ 46 | \x85\x37\x9b\x01\x9f\xb8\x57\x48\x67\x2d\x56\x7d\x82\x7a\x0f\x9f\ 47 | \x3d\x8c\x8e\x8d\x00\xb0\x6d\xec\x0e\x7e\x3e\xf9\x1a\xaf\x9c\xf9\ 48 | \x33\xfd\x3a\x1c\xfe\xd6\x3e\x72\xc1\x55\x14\x2b\xfb\x69\xa6\xdf\ 49 | \xe2\x42\x73\x86\xc8\xb5\xd9\x98\x1a\x5f\x0b\xb7\x16\x16\x3b\xbf\ 50 | \xa1\xb0\xae\x42\xdf\x86\x78\x46\x79\x7f\xca\x30\x3e\x7e\xe3\xa7\ 51 | \x97\xcf\xf4\x3f\xe6\x99\x3f\x1d\x22\x11\xf8\x3c\xff\xd0\x5e\x76\ 52 | \x8c\xac\x23\x28\x9f\x65\x7a\xf9\x02\x49\xcf\xa1\x16\x44\x0c\xad\ 53 | \xfe\x34\xc3\xe9\xdd\x98\x15\xc7\xc5\xe6\x65\xb2\xc5\x06\x42\x1a\ 54 | \xa7\x1d\xc4\x38\xe6\x67\xd7\x33\xb2\x79\x18\x80\x56\xd8\xe2\x81\ 55 | \x5f\xdf\x83\x5d\x84\x03\xbb\xee\xe6\xde\xed\xe3\xd4\xba\xc2\xe5\ 56 | \x10\xbc\x54\x1f\x00\xe7\x22\x44\x0c\x5d\x1b\xe0\xd4\xae\xc2\x43\ 57 | \x77\x09\xcf\x14\x51\x1c\x60\x01\xc5\xd3\x32\xb9\x6c\x96\xd0\xf6\ 58 | \x78\xf4\xd8\x57\x99\xad\xcd\xb1\xc5\x1b\xe1\x91\x3b\xef\xa1\xda\ 59 | \x8d\xa8\x75\x14\x83\x82\x0a\xfd\xa8\x8f\x31\x1e\x00\x3d\xd7\x00\ 60 | \x5c\x0c\x77\x0e\xac\x5b\x00\x04\x70\xa8\x3a\x40\x51\x57\x40\x0c\ 61 | \x1c\x7a\xe7\x47\xbc\xf9\xee\x71\xc2\x1a\x3c\xba\xf3\x31\x5a\x76\ 62 | \x81\x85\xce\x22\x32\xa8\x2e\xc5\x61\x9d\x45\xc4\x80\x42\xdb\x2e\ 63 | \xac\x2a\x57\x05\x11\x00\x03\x78\x18\x49\xc5\xca\xbd\x34\x17\x66\ 64 | \xcf\xf1\xe3\xd7\x7f\xc0\xd2\x87\x11\x4f\xdf\xf4\x2c\x7b\x26\x3e\ 65 | \x47\x43\xe7\xe3\xee\x5a\x79\x75\x14\x92\xf0\x12\xa8\x3a\x14\x88\ 66 | \x5c\x07\xd0\x18\x2e\x02\x36\xf2\x01\x45\x48\x60\x24\x87\x88\x47\ 67 | \x27\x9a\xe7\xdb\x87\xbf\x8e\x9b\xe9\xf3\xcd\x1b\x0e\xf2\xf0\x5d\ 68 | \x07\x98\xf3\x8f\x83\x7a\x03\xb8\xc6\x40\xa7\x6b\xca\xd9\xba\x10\ 69 | \x5d\x81\x1b\x03\x36\x2a\x63\x5d\x1d\xc1\x60\xa4\x80\x91\x34\xb5\ 70 | \xee\x49\x52\x8d\x80\xfb\xae\xbe\x8d\x87\x26\x6e\x27\x48\xbf\x41\ 71 | \xbb\xb7\x80\x20\xa8\xc6\x21\xb1\x2e\x56\x2b\xf1\x55\xa8\x2a\x46\ 72 | \x7c\x04\x59\x4d\x68\xce\xbf\x81\x56\xbb\x4a\xe4\x66\x11\xc9\x20\ 73 | \x24\xf1\xa2\x2e\x97\xcf\x44\x7c\xe5\xae\x27\xd9\x75\xfd\x97\xa9\ 74 | \xf6\x26\x11\x12\xe8\x40\x35\x40\x68\xfb\x18\x63\xe2\x15\x8d\xd7\ 75 | \xe3\x10\x7f\xa6\xfd\x2b\x1b\x2b\x5c\x79\xef\x56\xd2\x5b\xde\xc4\ 76 | \xb8\x22\x42\x8f\x5b\x26\x2a\x74\xeb\x7b\xb9\x6f\xef\x97\x98\xed\ 77 | \x9e\x43\xe7\x22\x64\x45\xa3\x02\xa2\x84\x51\x9f\x5c\x2a\x33\xb8\ 78 | \x4c\x50\x14\xe7\x22\x74\x90\x41\x56\x42\x33\xb6\xf9\x41\xce\x9d\ 79 | \x4d\x13\x69\x80\xb5\x11\x37\x4f\x0c\x71\xcb\xcd\xa3\x24\x12\x42\ 80 | \x3b\x9a\x1b\x3c\x1c\xd4\xc5\x98\xe5\x6e\x87\x4c\xd2\xc7\xa9\xc6\ 81 | \x3b\x71\xac\xc8\x7a\x43\x98\x95\xd9\xe2\x9c\xe3\xd4\x99\x93\xfc\ 82 | \xf6\xd4\x11\x4e\xbe\x73\x8c\xfd\x77\x0f\xf1\xb5\x83\xdb\x48\xa7\ 83 | \x93\x6c\xd9\xf9\x57\x2e\x5e\xbc\x84\x96\xb3\xb1\x3a\x55\x30\x8a\ 84 | \x53\xa5\x13\x86\x14\x33\x39\x54\x1d\x82\x87\x0a\x28\x96\x42\xf2\ 85 | \x5a\x8c\x24\x48\xb4\x3b\x6d\x9e\x7b\xf1\x7b\xfc\xe2\xc4\x4b\x7c\ 86 | \x50\xad\x51\x91\x34\x3f\x3b\xdc\xa4\xe4\xdd\xc9\x8d\xb7\x2d\x72\ 87 | \xdd\xb6\x79\xc2\xce\x4f\x68\xbb\x08\xc4\xa1\x6a\x00\xa1\xd1\xfe\ 88 | \x84\x52\x26\x8b\x53\x45\x24\x0e\x87\xe0\x40\x61\x43\x6a\x07\x46\ 89 | \x92\x88\xc6\x5d\x40\xaf\xdb\xe3\xef\xd5\x8f\x79\xe4\xf1\x87\x09\ 90 | \x1a\x75\x5e\x7d\xe1\x28\x99\x54\x81\xf3\xef\x9d\xa1\x1b\x7e\x44\ 91 | \x3f\x0c\x71\x57\x5f\x22\xbf\x79\x09\xd4\x23\x58\x5e\x66\xb8\x58\ 92 | \x06\x31\x18\x63\x10\x04\x11\x83\xcf\x7a\xc6\xcb\xdf\x61\x7d\x7e\ 93 | \x74\x00\xff\x8c\x1d\x7d\xe3\x35\x7e\x78\xe8\xfb\x1c\x79\xe9\x75\ 94 | \x2a\x95\xa1\x78\xc6\xbb\x78\xb0\x4d\x7d\xf8\x32\xb5\xd4\x11\xae\ 95 | \x2c\x5a\xf2\x99\x14\x19\x3f\x85\x60\x10\x31\xf1\x2f\x25\x49\xae\ 96 | \xf1\x1f\xe0\x9a\xf4\x5e\xf2\xc5\xcc\x6a\x42\x57\xec\xd6\x89\x3b\ 97 | \xd8\x7f\xff\x01\x72\xf9\xd5\x2f\x4b\x0c\x24\x92\xb0\xa9\xb4\x87\ 98 | \x64\x75\x2b\x66\x2e\x22\xe9\x45\x38\x0d\x71\x44\x58\xed\x20\x24\ 99 | \xd9\x5e\x3e\xc0\x8e\xa1\xfb\xc9\x17\x33\xb1\xdf\x3f\x2b\xb7\xd6\ 100 | \xd2\x6a\x2d\x51\x2a\x95\x91\x95\x82\x1d\x98\x73\x8e\x7a\x7d\x8e\ 101 | \x0f\xfe\x76\x91\x46\xab\x4e\x79\x5b\x0d\xe7\x07\x0c\xe7\xc6\xb9\ 102 | \x2a\xbf\x87\x8c\xb7\x6e\xd0\x4e\xb1\xfd\x03\x71\x4a\xa6\xa2\x02\ 103 | \x01\x23\x11\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\ 104 | " 105 | 106 | qt_resource_name = "\ 107 | \x00\x07\ 108 | \x07\x3b\xe0\xb3\ 109 | \x00\x70\ 110 | \x00\x6c\x00\x75\x00\x67\x00\x69\x00\x6e\x00\x73\ 111 | \x00\x09\ 112 | \x00\x69\xc4\xb6\ 113 | \x00\x71\ 114 | \x00\x67\x00\x69\x00\x73\x00\x32\x00\x6c\x00\x65\x00\x61\x00\x66\ 115 | \x00\x08\ 116 | \x05\xe2\x59\x27\ 117 | \x00\x6c\ 118 | \x00\x6f\x00\x67\x00\x6f\x00\x2e\x00\x70\x00\x6e\x00\x67\ 119 | " 120 | 121 | qt_resource_struct = "\ 122 | \x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x01\ 123 | \x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x02\ 124 | \x00\x00\x00\x14\x00\x02\x00\x00\x00\x01\x00\x00\x00\x03\ 125 | \x00\x00\x00\x2c\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\ 126 | " 127 | 128 | def qInitResources(): 129 | QtCore.qRegisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data) 130 | 131 | def qCleanupResources(): 132 | QtCore.qUnregisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data) 133 | 134 | qInitResources() 135 | -------------------------------------------------------------------------------- /test_data/donkey.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /test_data/line_feature.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Geolicious/qgis2leaf/8438632797a50e601df7941b79ef79ddfe034090/test_data/line_feature.dbf -------------------------------------------------------------------------------- /test_data/line_feature.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] -------------------------------------------------------------------------------- /test_data/line_feature.qpj: -------------------------------------------------------------------------------- 1 | GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]] 2 | -------------------------------------------------------------------------------- /test_data/line_feature.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Geolicious/qgis2leaf/8438632797a50e601df7941b79ef79ddfe034090/test_data/line_feature.shp -------------------------------------------------------------------------------- /test_data/line_feature.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Geolicious/qgis2leaf/8438632797a50e601df7941b79ef79ddfe034090/test_data/line_feature.shx -------------------------------------------------------------------------------- /test_data/n-32-4_exp_4326.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Geolicious/qgis2leaf/8438632797a50e601df7941b79ef79ddfe034090/test_data/n-32-4_exp_4326.jpg -------------------------------------------------------------------------------- /test_data/n-32-4_exp_4326.jpg.aux.xml: -------------------------------------------------------------------------------- 1 | 2 | GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]] 3 | 9.1440550250419026e+00, 7.7040030412117851e-04, 0.0000000000000000e+00, 5.3768825265098478e+01, 0.0000000000000000e+00, -7.7024397935525595e-04 4 | 5 | JPEG 6 | PIXEL 7 | YCbCr 8 | 9 | 10 | Area 11 | 12 | 13 | nan 14 | 15 | JPEG 16 | 17 | 18 | 19 | nan 20 | 21 | JPEG 22 | 23 | 24 | 25 | nan 26 | 27 | JPEG 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /test_data/n-33-113-1_4284.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Geolicious/qgis2leaf/8438632797a50e601df7941b79ef79ddfe034090/test_data/n-33-113-1_4284.tif -------------------------------------------------------------------------------- /test_data/n-33-113-1_4284.tif.aux.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -0.498046875 6 | 255.498046875 7 | 256 8 | 0 9 | 1 10 | 340|2|0|1|1|1|1|5|7|12|15|13|19|22|25|41|49|64|64|67|62|90|91|107|128|122|124|157|144|180|172|166|183|190|176|191|232|197|195|170|178|224|197|174|187|180|192|208|190|186|203|187|203|197|204|232|177|208|219|196|213|201|200|235|248|259|231|252|249|203|240|270|240|254|280|266|259|254|275|277|281|259|256|278|276|278|271|320|287|291|302|268|300|333|337|322|309|325|334|341|338|349|324|354|352|338|356|354|402|392|399|394|382|412|404|417|439|431|437|395|446|447|428|471|476|459|445|451|438|422|419|437|423|435|441|480|481|426|486|505|470|467|478|472|478|523|502|514|552|548|634|578|685|659|715|732|784|804|789|874|943|1018|1027|1157|1091|1239|1264|1382|1334|1382|1344|1318|1247|1253|1211|1099|1008|958|807|789|714|652|652|594|592|515|468|474|411|424|394|397|386|366|400|387|367|380|362|357|365|355|362|362|333|347|351|326|355|323|319|333|340|330|350|316|287|299|332|325|292|302|338|327|361|339|333|355|378|354|399|425|372|401|465|473|503|526|571|613|652|783|853|936|1135|1314|1601|1916|2496|3420|4848|7219|11012|61103|7745|2256 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /test_data/n-33-113-1_4326.jpg.aux.xml: -------------------------------------------------------------------------------- 1 | 2 | GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]] 3 | 1.3971523770597951e+01, 1.0160605569573472e-04, 0.0000000000000000e+00, 5.3022156307436148e+01, 0.0000000000000000e+00, -1.0160605569573472e-04 4 | 5 | Area 6 | 7 | 8 | 9 | 10 | -0.498046875 11 | 255.498046875 12 | 256 13 | 0 14 | 1 15 | 16|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|1|0|1|2|0|3|1|0|0|1|1|0|2|3|1|2|5|3|2|0|4|2|3|1|3|4|3|6|6|1|5|6|9|5|6|5|7|5|8|6|9|4|7|13|10|8|11|4|15|7|5|16|12|13|17|13|15|11|19|17|19|24|19|20|22|20|21|18|23|23|18|21|26|31|30|33|35|38|27|28|32|42|34|36|50|27|32|39|29|42|30|40|26|37|30|32|50|38|33|35|37|42|39|35|37|44|38|43|37|41|26|33|39|28|27|24|23|19|22|17|16|28|23|16|20|19|24|16|25|15|31|21|20|27|17|17|13|24|21|19|21|17|14|31|17|25|25|17|23|23|21|27|29|31|23|24|27|26|27|22|35|33|34|32|28|22|30|37|36|24|36|35|25|20|30|34|36|36|35|23|32|33|20|19|23|36|28|36|54|101|232|507|1729|0|0 16 | 17 | 18 | 19 | JPEG 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /test_data/places_few_1.cpg: -------------------------------------------------------------------------------- 1 | UTF-8 -------------------------------------------------------------------------------- /test_data/places_few_1.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Geolicious/qgis2leaf/8438632797a50e601df7941b79ef79ddfe034090/test_data/places_few_1.dbf -------------------------------------------------------------------------------- /test_data/places_few_1.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] -------------------------------------------------------------------------------- /test_data/places_few_1.qpj: -------------------------------------------------------------------------------- 1 | GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]] 2 | -------------------------------------------------------------------------------- /test_data/places_few_1.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Geolicious/qgis2leaf/8438632797a50e601df7941b79ef79ddfe034090/test_data/places_few_1.shp -------------------------------------------------------------------------------- /test_data/places_few_1.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Geolicious/qgis2leaf/8438632797a50e601df7941b79ef79ddfe034090/test_data/places_few_1.shx -------------------------------------------------------------------------------- /test_data/places_few_1_EPSG3857.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Geolicious/qgis2leaf/8438632797a50e601df7941b79ef79ddfe034090/test_data/places_few_1_EPSG3857.dbf -------------------------------------------------------------------------------- /test_data/places_few_1_EPSG3857.prj: -------------------------------------------------------------------------------- 1 | PROJCS["WGS_84_Pseudo_Mercator",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Mercator"],PARAMETER["central_meridian",0],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["Meter",1],PARAMETER["standard_parallel_1",0.0]] -------------------------------------------------------------------------------- /test_data/places_few_1_EPSG3857.qpj: -------------------------------------------------------------------------------- 1 | PROJCS["WGS 84 / Pseudo-Mercator",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["Mercator_1SP"],PARAMETER["central_meridian",0],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["X",EAST],AXIS["Y",NORTH],EXTENSION["PROJ4","+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs"],AUTHORITY["EPSG","3857"]] 2 | -------------------------------------------------------------------------------- /test_data/places_few_1_EPSG3857.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Geolicious/qgis2leaf/8438632797a50e601df7941b79ef79ddfe034090/test_data/places_few_1_EPSG3857.shp -------------------------------------------------------------------------------- /test_data/places_few_1_EPSG3857.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Geolicious/qgis2leaf/8438632797a50e601df7941b79ef79ddfe034090/test_data/places_few_1_EPSG3857.shx -------------------------------------------------------------------------------- /test_data/places_few_2.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Geolicious/qgis2leaf/8438632797a50e601df7941b79ef79ddfe034090/test_data/places_few_2.dbf -------------------------------------------------------------------------------- /test_data/places_few_2.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] -------------------------------------------------------------------------------- /test_data/places_few_2.qpj: -------------------------------------------------------------------------------- 1 | GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]] 2 | -------------------------------------------------------------------------------- /test_data/places_few_2.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Geolicious/qgis2leaf/8438632797a50e601df7941b79ef79ddfe034090/test_data/places_few_2.shp -------------------------------------------------------------------------------- /test_data/places_few_2.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Geolicious/qgis2leaf/8438632797a50e601df7941b79ef79ddfe034090/test_data/places_few_2.shx -------------------------------------------------------------------------------- /test_data/polygon_feature.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Geolicious/qgis2leaf/8438632797a50e601df7941b79ef79ddfe034090/test_data/polygon_feature.dbf -------------------------------------------------------------------------------- /test_data/polygon_feature.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] -------------------------------------------------------------------------------- /test_data/polygon_feature.qpj: -------------------------------------------------------------------------------- 1 | GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]] 2 | -------------------------------------------------------------------------------- /test_data/polygon_feature.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Geolicious/qgis2leaf/8438632797a50e601df7941b79ef79ddfe034090/test_data/polygon_feature.shp -------------------------------------------------------------------------------- /test_data/polygon_feature.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Geolicious/qgis2leaf/8438632797a50e601df7941b79ef79ddfe034090/test_data/polygon_feature.shx -------------------------------------------------------------------------------- /ui_qgis2leaf.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # Form implementation generated from reading ui file 'ui_qgis2leaf.ui' 4 | # 5 | # Created: Wed Apr 15 00:16:50 2015 6 | # by: PyQt4 UI code generator 4.10.4 7 | # 8 | # WARNING! All changes made in this file will be lost! 9 | 10 | from PyQt4 import QtCore, QtGui 11 | 12 | try: 13 | _fromUtf8 = QtCore.QString.fromUtf8 14 | except AttributeError: 15 | def _fromUtf8(s): 16 | return s 17 | 18 | try: 19 | _encoding = QtGui.QApplication.UnicodeUTF8 20 | def _translate(context, text, disambig): 21 | return QtGui.QApplication.translate(context, text, disambig, _encoding) 22 | except AttributeError: 23 | def _translate(context, text, disambig): 24 | return QtGui.QApplication.translate(context, text, disambig) 25 | 26 | class Ui_qgis2leaf(object): 27 | def setupUi(self, qgis2leaf): 28 | qgis2leaf.setObjectName(_fromUtf8("qgis2leaf")) 29 | qgis2leaf.resize(677, 688) 30 | self.label = QtGui.QLabel(qgis2leaf) 31 | self.label.setGeometry(QtCore.QRect(10, 10, 131, 18)) 32 | font = QtGui.QFont() 33 | font.setFamily(_fromUtf8("DejaVu Sans")) 34 | font.setPointSize(11) 35 | font.setBold(True) 36 | font.setWeight(75) 37 | self.label.setFont(font) 38 | self.label.setObjectName(_fromUtf8("label")) 39 | self.label_2 = QtGui.QLabel(qgis2leaf) 40 | self.label_2.setGeometry(QtCore.QRect(10, 30, 461, 21)) 41 | font = QtGui.QFont() 42 | font.setFamily(_fromUtf8("DejaVu Sans")) 43 | self.label_2.setFont(font) 44 | self.label_2.setObjectName(_fromUtf8("label_2")) 45 | self.line_3 = QtGui.QFrame(qgis2leaf) 46 | self.line_3.setGeometry(QtCore.QRect(10, 50, 661, 16)) 47 | self.line_3.setFrameShape(QtGui.QFrame.HLine) 48 | self.line_3.setFrameShadow(QtGui.QFrame.Sunken) 49 | self.line_3.setObjectName(_fromUtf8("line_3")) 50 | self.tab_2 = QtGui.QTabWidget(qgis2leaf) 51 | self.tab_2.setGeometry(QtCore.QRect(10, 60, 661, 621)) 52 | self.tab_2.setObjectName(_fromUtf8("tab_2")) 53 | self.tab_app = QtGui.QWidget() 54 | self.tab_app.setObjectName(_fromUtf8("tab_app")) 55 | self.listWidget = QtGui.QListWidget(self.tab_app) 56 | self.listWidget.setGeometry(QtCore.QRect(10, 10, 251, 161)) 57 | self.listWidget.setObjectName(_fromUtf8("listWidget")) 58 | self.gridLayoutWidget = QtGui.QWidget(self.tab_app) 59 | self.gridLayoutWidget.setGeometry(QtCore.QRect(10, 186, 641, 401)) 60 | self.gridLayoutWidget.setObjectName(_fromUtf8("gridLayoutWidget")) 61 | self.gridLayout = QtGui.QGridLayout(self.gridLayoutWidget) 62 | self.gridLayout.setSpacing(10) 63 | self.gridLayout.setMargin(0) 64 | self.gridLayout.setObjectName(_fromUtf8("gridLayout")) 65 | self.radioButton = QtGui.QRadioButton(self.gridLayoutWidget) 66 | self.radioButton.setObjectName(_fromUtf8("radioButton")) 67 | self.gridLayout.addWidget(self.radioButton, 1, 2, 1, 1) 68 | self.horizontalLayout_2 = QtGui.QHBoxLayout() 69 | self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2")) 70 | self.width_box = QtGui.QLineEdit(self.gridLayoutWidget) 71 | self.width_box.setObjectName(_fromUtf8("width_box")) 72 | self.horizontalLayout_2.addWidget(self.width_box) 73 | self.label_7 = QtGui.QLabel(self.gridLayoutWidget) 74 | font = QtGui.QFont() 75 | font.setFamily(_fromUtf8("DejaVu Sans")) 76 | self.label_7.setFont(font) 77 | self.label_7.setObjectName(_fromUtf8("label_7")) 78 | self.horizontalLayout_2.addWidget(self.label_7) 79 | self.height_box = QtGui.QLineEdit(self.gridLayoutWidget) 80 | self.height_box.setObjectName(_fromUtf8("height_box")) 81 | self.horizontalLayout_2.addWidget(self.height_box) 82 | self.getSizeButton = QtGui.QPushButton(self.gridLayoutWidget) 83 | self.getSizeButton.setObjectName(_fromUtf8("getSizeButton")) 84 | self.horizontalLayout_2.addWidget(self.getSizeButton) 85 | self.gridLayout.addLayout(self.horizontalLayout_2, 1, 1, 1, 1) 86 | self.label_9 = QtGui.QLabel(self.gridLayoutWidget) 87 | font = QtGui.QFont() 88 | font.setFamily(_fromUtf8("Ubuntu")) 89 | font.setBold(False) 90 | font.setWeight(50) 91 | self.label_9.setFont(font) 92 | self.label_9.setObjectName(_fromUtf8("label_9")) 93 | self.gridLayout.addWidget(self.label_9, 3, 0, 1, 1) 94 | self.comboBox_3 = QtGui.QComboBox(self.gridLayoutWidget) 95 | self.comboBox_3.setObjectName(_fromUtf8("comboBox_3")) 96 | self.gridLayout.addWidget(self.comboBox_3, 3, 1, 1, 1) 97 | self.horizontalLayout_4 = QtGui.QHBoxLayout() 98 | self.horizontalLayout_4.setObjectName(_fromUtf8("horizontalLayout_4")) 99 | spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) 100 | self.horizontalLayout_4.addItem(spacerItem) 101 | self.cancelButton = QtGui.QPushButton(self.gridLayoutWidget) 102 | self.cancelButton.setObjectName(_fromUtf8("cancelButton")) 103 | self.horizontalLayout_4.addWidget(self.cancelButton) 104 | self.gridLayout.addLayout(self.horizontalLayout_4, 10, 1, 1, 1) 105 | self.okButton = QtGui.QPushButton(self.gridLayoutWidget) 106 | self.okButton.setObjectName(_fromUtf8("okButton")) 107 | self.gridLayout.addWidget(self.okButton, 10, 2, 1, 1) 108 | self.pushButton_2 = QtGui.QPushButton(self.gridLayoutWidget) 109 | self.pushButton_2.setObjectName(_fromUtf8("pushButton_2")) 110 | self.gridLayout.addWidget(self.pushButton_2, 5, 2, 1, 1) 111 | self.label_3 = QtGui.QLabel(self.gridLayoutWidget) 112 | font = QtGui.QFont() 113 | font.setFamily(_fromUtf8("Ubuntu")) 114 | font.setBold(False) 115 | font.setWeight(50) 116 | self.label_3.setFont(font) 117 | self.label_3.setObjectName(_fromUtf8("label_3")) 118 | self.gridLayout.addWidget(self.label_3, 5, 0, 1, 1) 119 | self.comboBox_2 = QtGui.QComboBox(self.gridLayoutWidget) 120 | self.comboBox_2.setObjectName(_fromUtf8("comboBox_2")) 121 | self.gridLayout.addWidget(self.comboBox_2, 2, 1, 1, 1) 122 | self.label_4 = QtGui.QLabel(self.gridLayoutWidget) 123 | font = QtGui.QFont() 124 | font.setFamily(_fromUtf8("Ubuntu")) 125 | font.setBold(False) 126 | font.setWeight(50) 127 | self.label_4.setFont(font) 128 | self.label_4.setObjectName(_fromUtf8("label_4")) 129 | self.gridLayout.addWidget(self.label_4, 4, 0, 1, 1) 130 | self.label_6 = QtGui.QLabel(self.gridLayoutWidget) 131 | font = QtGui.QFont() 132 | font.setFamily(_fromUtf8("Ubuntu")) 133 | font.setBold(False) 134 | font.setWeight(50) 135 | self.label_6.setFont(font) 136 | self.label_6.setObjectName(_fromUtf8("label_6")) 137 | self.gridLayout.addWidget(self.label_6, 2, 0, 1, 1) 138 | self.label_5 = QtGui.QLabel(self.gridLayoutWidget) 139 | font = QtGui.QFont() 140 | font.setFamily(_fromUtf8("Ubuntu")) 141 | font.setBold(False) 142 | font.setWeight(50) 143 | self.label_5.setFont(font) 144 | self.label_5.setObjectName(_fromUtf8("label_5")) 145 | self.gridLayout.addWidget(self.label_5, 1, 0, 1, 1) 146 | self.label_8 = QtGui.QLabel(self.gridLayoutWidget) 147 | font = QtGui.QFont() 148 | font.setFamily(_fromUtf8("Ubuntu")) 149 | font.setBold(False) 150 | font.setWeight(50) 151 | self.label_8.setFont(font) 152 | self.label_8.setObjectName(_fromUtf8("label_8")) 153 | self.gridLayout.addWidget(self.label_8, 6, 0, 1, 1) 154 | self.webmap_head = QtGui.QLineEdit(self.gridLayoutWidget) 155 | self.webmap_head.setObjectName(_fromUtf8("webmap_head")) 156 | self.gridLayout.addWidget(self.webmap_head, 7, 1, 1, 1) 157 | self.label_10 = QtGui.QLabel(self.gridLayoutWidget) 158 | font = QtGui.QFont() 159 | font.setFamily(_fromUtf8("Ubuntu")) 160 | font.setBold(False) 161 | font.setWeight(50) 162 | self.label_10.setFont(font) 163 | self.label_10.setObjectName(_fromUtf8("label_10")) 164 | self.gridLayout.addWidget(self.label_10, 7, 0, 1, 1) 165 | self.webpage_name = QtGui.QLineEdit(self.gridLayoutWidget) 166 | self.webpage_name.setObjectName(_fromUtf8("webpage_name")) 167 | self.gridLayout.addWidget(self.webpage_name, 6, 1, 1, 1) 168 | self.label_11 = QtGui.QLabel(self.gridLayoutWidget) 169 | font = QtGui.QFont() 170 | font.setFamily(_fromUtf8("Ubuntu")) 171 | font.setBold(False) 172 | font.setWeight(50) 173 | self.label_11.setFont(font) 174 | self.label_11.setObjectName(_fromUtf8("label_11")) 175 | self.gridLayout.addWidget(self.label_11, 8, 0, 1, 1) 176 | self.webmap_subhead = QtGui.QLineEdit(self.gridLayoutWidget) 177 | self.webmap_subhead.setObjectName(_fromUtf8("webmap_subhead")) 178 | self.gridLayout.addWidget(self.webmap_subhead, 8, 1, 1, 1) 179 | self.locate = QtGui.QCheckBox(self.gridLayoutWidget) 180 | self.locate.setObjectName(_fromUtf8("locate")) 181 | self.gridLayout.addWidget(self.locate, 2, 2, 1, 1) 182 | self.lineEdit_2 = QtGui.QLineEdit(self.gridLayoutWidget) 183 | self.lineEdit_2.setObjectName(_fromUtf8("lineEdit_2")) 184 | self.gridLayout.addWidget(self.lineEdit_2, 5, 1, 1, 1) 185 | self.comboBox = QtGui.QListWidget(self.gridLayoutWidget) 186 | self.comboBox.setObjectName(_fromUtf8("comboBox")) 187 | self.gridLayout.addWidget(self.comboBox, 4, 1, 1, 1) 188 | self.line_2 = QtGui.QFrame(self.tab_app) 189 | self.line_2.setGeometry(QtCore.QRect(10, 170, 641, 16)) 190 | self.line_2.setFrameShape(QtGui.QFrame.HLine) 191 | self.line_2.setFrameShadow(QtGui.QFrame.Sunken) 192 | self.line_2.setObjectName(_fromUtf8("line_2")) 193 | self.getButton = QtGui.QPushButton(self.tab_app) 194 | self.getButton.setGeometry(QtCore.QRect(270, 10, 81, 31)) 195 | palette = QtGui.QPalette() 196 | brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) 197 | brush.setStyle(QtCore.Qt.SolidPattern) 198 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.WindowText, brush) 199 | brush = QtGui.QBrush(QtGui.QColor(255, 0, 0)) 200 | brush.setStyle(QtCore.Qt.SolidPattern) 201 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Button, brush) 202 | brush = QtGui.QBrush(QtGui.QColor(255, 127, 127)) 203 | brush.setStyle(QtCore.Qt.SolidPattern) 204 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Light, brush) 205 | brush = QtGui.QBrush(QtGui.QColor(255, 63, 63)) 206 | brush.setStyle(QtCore.Qt.SolidPattern) 207 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Midlight, brush) 208 | brush = QtGui.QBrush(QtGui.QColor(127, 0, 0)) 209 | brush.setStyle(QtCore.Qt.SolidPattern) 210 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Dark, brush) 211 | brush = QtGui.QBrush(QtGui.QColor(170, 0, 0)) 212 | brush.setStyle(QtCore.Qt.SolidPattern) 213 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Mid, brush) 214 | brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) 215 | brush.setStyle(QtCore.Qt.SolidPattern) 216 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Text, brush) 217 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 218 | brush.setStyle(QtCore.Qt.SolidPattern) 219 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.BrightText, brush) 220 | brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) 221 | brush.setStyle(QtCore.Qt.SolidPattern) 222 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ButtonText, brush) 223 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 224 | brush.setStyle(QtCore.Qt.SolidPattern) 225 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Base, brush) 226 | brush = QtGui.QBrush(QtGui.QColor(255, 0, 0)) 227 | brush.setStyle(QtCore.Qt.SolidPattern) 228 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Window, brush) 229 | brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) 230 | brush.setStyle(QtCore.Qt.SolidPattern) 231 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Shadow, brush) 232 | brush = QtGui.QBrush(QtGui.QColor(255, 127, 127)) 233 | brush.setStyle(QtCore.Qt.SolidPattern) 234 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.AlternateBase, brush) 235 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 220)) 236 | brush.setStyle(QtCore.Qt.SolidPattern) 237 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ToolTipBase, brush) 238 | brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) 239 | brush.setStyle(QtCore.Qt.SolidPattern) 240 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ToolTipText, brush) 241 | brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) 242 | brush.setStyle(QtCore.Qt.SolidPattern) 243 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.WindowText, brush) 244 | brush = QtGui.QBrush(QtGui.QColor(255, 0, 0)) 245 | brush.setStyle(QtCore.Qt.SolidPattern) 246 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Button, brush) 247 | brush = QtGui.QBrush(QtGui.QColor(255, 127, 127)) 248 | brush.setStyle(QtCore.Qt.SolidPattern) 249 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Light, brush) 250 | brush = QtGui.QBrush(QtGui.QColor(255, 63, 63)) 251 | brush.setStyle(QtCore.Qt.SolidPattern) 252 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Midlight, brush) 253 | brush = QtGui.QBrush(QtGui.QColor(127, 0, 0)) 254 | brush.setStyle(QtCore.Qt.SolidPattern) 255 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Dark, brush) 256 | brush = QtGui.QBrush(QtGui.QColor(170, 0, 0)) 257 | brush.setStyle(QtCore.Qt.SolidPattern) 258 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Mid, brush) 259 | brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) 260 | brush.setStyle(QtCore.Qt.SolidPattern) 261 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Text, brush) 262 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 263 | brush.setStyle(QtCore.Qt.SolidPattern) 264 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.BrightText, brush) 265 | brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) 266 | brush.setStyle(QtCore.Qt.SolidPattern) 267 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ButtonText, brush) 268 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 269 | brush.setStyle(QtCore.Qt.SolidPattern) 270 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Base, brush) 271 | brush = QtGui.QBrush(QtGui.QColor(255, 0, 0)) 272 | brush.setStyle(QtCore.Qt.SolidPattern) 273 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Window, brush) 274 | brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) 275 | brush.setStyle(QtCore.Qt.SolidPattern) 276 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Shadow, brush) 277 | brush = QtGui.QBrush(QtGui.QColor(255, 127, 127)) 278 | brush.setStyle(QtCore.Qt.SolidPattern) 279 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.AlternateBase, brush) 280 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 220)) 281 | brush.setStyle(QtCore.Qt.SolidPattern) 282 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ToolTipBase, brush) 283 | brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) 284 | brush.setStyle(QtCore.Qt.SolidPattern) 285 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ToolTipText, brush) 286 | brush = QtGui.QBrush(QtGui.QColor(127, 0, 0)) 287 | brush.setStyle(QtCore.Qt.SolidPattern) 288 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.WindowText, brush) 289 | brush = QtGui.QBrush(QtGui.QColor(255, 0, 0)) 290 | brush.setStyle(QtCore.Qt.SolidPattern) 291 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Button, brush) 292 | brush = QtGui.QBrush(QtGui.QColor(255, 127, 127)) 293 | brush.setStyle(QtCore.Qt.SolidPattern) 294 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Light, brush) 295 | brush = QtGui.QBrush(QtGui.QColor(255, 63, 63)) 296 | brush.setStyle(QtCore.Qt.SolidPattern) 297 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Midlight, brush) 298 | brush = QtGui.QBrush(QtGui.QColor(127, 0, 0)) 299 | brush.setStyle(QtCore.Qt.SolidPattern) 300 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Dark, brush) 301 | brush = QtGui.QBrush(QtGui.QColor(170, 0, 0)) 302 | brush.setStyle(QtCore.Qt.SolidPattern) 303 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Mid, brush) 304 | brush = QtGui.QBrush(QtGui.QColor(127, 0, 0)) 305 | brush.setStyle(QtCore.Qt.SolidPattern) 306 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Text, brush) 307 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 308 | brush.setStyle(QtCore.Qt.SolidPattern) 309 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.BrightText, brush) 310 | brush = QtGui.QBrush(QtGui.QColor(127, 0, 0)) 311 | brush.setStyle(QtCore.Qt.SolidPattern) 312 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ButtonText, brush) 313 | brush = QtGui.QBrush(QtGui.QColor(255, 0, 0)) 314 | brush.setStyle(QtCore.Qt.SolidPattern) 315 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush) 316 | brush = QtGui.QBrush(QtGui.QColor(255, 0, 0)) 317 | brush.setStyle(QtCore.Qt.SolidPattern) 318 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Window, brush) 319 | brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) 320 | brush.setStyle(QtCore.Qt.SolidPattern) 321 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Shadow, brush) 322 | brush = QtGui.QBrush(QtGui.QColor(255, 0, 0)) 323 | brush.setStyle(QtCore.Qt.SolidPattern) 324 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.AlternateBase, brush) 325 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 220)) 326 | brush.setStyle(QtCore.Qt.SolidPattern) 327 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ToolTipBase, brush) 328 | brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) 329 | brush.setStyle(QtCore.Qt.SolidPattern) 330 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ToolTipText, brush) 331 | self.getButton.setPalette(palette) 332 | self.getButton.setObjectName(_fromUtf8("getButton")) 333 | self.encode2JSON = QtGui.QCheckBox(self.tab_app) 334 | self.encode2JSON.setGeometry(QtCore.QRect(270, 60, 151, 21)) 335 | self.encode2JSON.setLayoutDirection(QtCore.Qt.LeftToRight) 336 | self.encode2JSON.setObjectName(_fromUtf8("encode2JSON")) 337 | self.createcluster = QtGui.QCheckBox(self.tab_app) 338 | self.createcluster.setGeometry(QtCore.QRect(270, 40, 151, 21)) 339 | self.createcluster.setLayoutDirection(QtCore.Qt.LeftToRight) 340 | self.createcluster.setObjectName(_fromUtf8("createcluster")) 341 | self.createlegend = QtGui.QCheckBox(self.tab_app) 342 | self.createlegend.setGeometry(QtCore.QRect(270, 80, 151, 21)) 343 | self.createlegend.setLayoutDirection(QtCore.Qt.LeftToRight) 344 | self.createlegend.setObjectName(_fromUtf8("createlegend")) 345 | self.checkBox = QtGui.QCheckBox(self.tab_app) 346 | self.checkBox.setEnabled(True) 347 | self.checkBox.setGeometry(QtCore.QRect(480, 100, 186, 21)) 348 | self.checkBox.setAutoFillBackground(False) 349 | self.checkBox.setChecked(False) 350 | self.checkBox.setObjectName(_fromUtf8("checkBox")) 351 | self.address = QtGui.QCheckBox(self.tab_app) 352 | self.address.setGeometry(QtCore.QRect(270, 120, 181, 22)) 353 | self.address.setObjectName(_fromUtf8("address")) 354 | self.layoutWidget = QtGui.QWidget(self.tab_app) 355 | self.layoutWidget.setGeometry(QtCore.QRect(270, 140, 208, 29)) 356 | self.layoutWidget.setObjectName(_fromUtf8("layoutWidget")) 357 | self.horizontalLayout = QtGui.QHBoxLayout(self.layoutWidget) 358 | self.horizontalLayout.setMargin(0) 359 | self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout")) 360 | self.spinBox = QtGui.QSpinBox(self.layoutWidget) 361 | self.spinBox.setMinimum(1) 362 | self.spinBox.setMaximum(15) 363 | self.spinBox.setProperty("value", 15) 364 | self.spinBox.setObjectName(_fromUtf8("spinBox")) 365 | self.horizontalLayout.addWidget(self.spinBox) 366 | self.label_14 = QtGui.QLabel(self.layoutWidget) 367 | self.label_14.setObjectName(_fromUtf8("label_14")) 368 | self.horizontalLayout.addWidget(self.label_14) 369 | self.extract_labels = QtGui.QCheckBox(self.tab_app) 370 | self.extract_labels.setGeometry(QtCore.QRect(480, 40, 121, 22)) 371 | self.extract_labels.setObjectName(_fromUtf8("extract_labels")) 372 | self.labelsonhover = QtGui.QCheckBox(self.tab_app) 373 | self.labelsonhover.setGeometry(QtCore.QRect(480, 60, 161, 21)) 374 | self.labelsonhover.setObjectName(_fromUtf8("labelsonhover")) 375 | self.matchCRS = QtGui.QCheckBox(self.tab_app) 376 | self.matchCRS.setGeometry(QtCore.QRect(480, 80, 161, 21)) 377 | self.matchCRS.setObjectName(_fromUtf8("matchCRS")) 378 | self.exp_selected = QtGui.QCheckBox(self.tab_app) 379 | self.exp_selected.setEnabled(True) 380 | self.exp_selected.setGeometry(QtCore.QRect(270, 100, 186, 21)) 381 | self.exp_selected.setAutoFillBackground(False) 382 | self.exp_selected.setChecked(False) 383 | self.exp_selected.setObjectName(_fromUtf8("exp_selected")) 384 | self.tab_2.addTab(self.tab_app, _fromUtf8("")) 385 | self.tab_settings = QtGui.QWidget() 386 | self.tab_settings.setObjectName(_fromUtf8("tab_settings")) 387 | self.label_12 = QtGui.QLabel(self.tab_settings) 388 | self.label_12.setGeometry(QtCore.QRect(10, 70, 81, 27)) 389 | font = QtGui.QFont() 390 | font.setFamily(_fromUtf8("DejaVu Sans")) 391 | self.label_12.setFont(font) 392 | self.label_12.setObjectName(_fromUtf8("label_12")) 393 | self.lineEdit_3 = QtGui.QLineEdit(self.tab_settings) 394 | self.lineEdit_3.setGeometry(QtCore.QRect(89, 70, 311, 27)) 395 | self.lineEdit_3.setObjectName(_fromUtf8("lineEdit_3")) 396 | self.pushButton_3 = QtGui.QPushButton(self.tab_settings) 397 | self.pushButton_3.setGeometry(QtCore.QRect(400, 70, 31, 27)) 398 | self.pushButton_3.setObjectName(_fromUtf8("pushButton_3")) 399 | self.okButton_2 = QtGui.QPushButton(self.tab_settings) 400 | self.okButton_2.setGeometry(QtCore.QRect(433, 70, 111, 27)) 401 | self.okButton_2.setObjectName(_fromUtf8("okButton_2")) 402 | self.okButton_3 = QtGui.QPushButton(self.tab_settings) 403 | self.okButton_3.setGeometry(QtCore.QRect(433, 100, 111, 27)) 404 | self.okButton_3.setObjectName(_fromUtf8("okButton_3")) 405 | self.lineEdit_4 = QtGui.QLineEdit(self.tab_settings) 406 | self.lineEdit_4.setGeometry(QtCore.QRect(89, 100, 311, 27)) 407 | self.lineEdit_4.setObjectName(_fromUtf8("lineEdit_4")) 408 | self.pushButton_4 = QtGui.QPushButton(self.tab_settings) 409 | self.pushButton_4.setGeometry(QtCore.QRect(400, 100, 31, 27)) 410 | self.pushButton_4.setObjectName(_fromUtf8("pushButton_4")) 411 | self.label_13 = QtGui.QLabel(self.tab_settings) 412 | self.label_13.setGeometry(QtCore.QRect(10, 100, 81, 27)) 413 | font = QtGui.QFont() 414 | font.setFamily(_fromUtf8("DejaVu Sans")) 415 | self.label_13.setFont(font) 416 | self.label_13.setObjectName(_fromUtf8("label_13")) 417 | self.textBrowser_2 = QtGui.QTextBrowser(self.tab_settings) 418 | self.textBrowser_2.setGeometry(QtCore.QRect(10, 10, 641, 51)) 419 | self.textBrowser_2.setObjectName(_fromUtf8("textBrowser_2")) 420 | self.tab_2.addTab(self.tab_settings, _fromUtf8("")) 421 | self.tab_help = QtGui.QWidget() 422 | self.tab_help.setObjectName(_fromUtf8("tab_help")) 423 | self.textBrowser = QtGui.QTextBrowser(self.tab_help) 424 | self.textBrowser.setGeometry(QtCore.QRect(10, 10, 641, 511)) 425 | self.textBrowser.setObjectName(_fromUtf8("textBrowser")) 426 | self.tab_2.addTab(self.tab_help, _fromUtf8("")) 427 | self.actionLoadList = QtGui.QAction(qgis2leaf) 428 | self.actionLoadList.setObjectName(_fromUtf8("actionLoadList")) 429 | 430 | self.retranslateUi(qgis2leaf) 431 | self.tab_2.setCurrentIndex(0) 432 | QtCore.QMetaObject.connectSlotsByName(qgis2leaf) 433 | 434 | def retranslateUi(self, qgis2leaf): 435 | qgis2leaf.setWindowTitle(_translate("qgis2leaf", "qgis2leaf", None)) 436 | self.label.setText(_translate("qgis2leaf", "QGIS2leaf", None)) 437 | self.label_2.setText(_translate("qgis2leaf", "Export your vector and raster data to a leaflet based webmap", None)) 438 | self.radioButton.setText(_translate("qgis2leaf", "Full Screen", None)) 439 | self.label_7.setText(_translate("qgis2leaf", "/", None)) 440 | self.getSizeButton.setText(_translate("qgis2leaf", "Get Size", None)) 441 | self.label_9.setText(_translate("qgis2leaf", "Visible layers:", None)) 442 | self.cancelButton.setText(_translate("qgis2leaf", "Cancel", None)) 443 | self.okButton.setText(_translate("qgis2leaf", "OK", None)) 444 | self.pushButton_2.setText(_translate("qgis2leaf", "...", None)) 445 | self.label_3.setText(_translate("qgis2leaf", "Output project folder:", None)) 446 | self.label_4.setText(_translate("qgis2leaf", "Basemaps:", None)) 447 | self.label_6.setText(_translate("qgis2leaf", "Extent:", None)) 448 | self.label_5.setText(_translate("qgis2leaf", "Frame width / height:", None)) 449 | self.label_8.setText(_translate("qgis2leaf", "Webpage name", None)) 450 | self.label_10.setText(_translate("qgis2leaf", "Webmap title", None)) 451 | self.label_11.setText(_translate("qgis2leaf", "Webmap subtitle", None)) 452 | self.locate.setText(_translate("qgis2leaf", "Locate", None)) 453 | self.getButton.setText(_translate("qgis2leaf", "Get Layers", None)) 454 | self.encode2JSON.setText(_translate("qgis2leaf", "Encode to JSON", None)) 455 | self.createcluster.setText(_translate("qgis2leaf", "Create cluster", None)) 456 | self.createlegend.setText(_translate("qgis2leaf", "Create legend", None)) 457 | self.checkBox.setText(_translate("qgis2leaf", "Create opacity control", None)) 458 | self.address.setText(_translate("qgis2leaf", "Address search field", None)) 459 | self.label_14.setText(_translate("qgis2leaf", "Coordinate precision", None)) 460 | self.extract_labels.setText(_translate("qgis2leaf", "extract labels", None)) 461 | self.labelsonhover.setText(_translate("qgis2leaf", "labels on hover", None)) 462 | self.matchCRS.setText(_translate("qgis2leaf", "Match project CRS*", None)) 463 | self.exp_selected.setText(_translate("qgis2leaf", "Export selected only", None)) 464 | self.tab_2.setTabText(self.tab_2.indexOf(self.tab_app), _translate("qgis2leaf", "Export", None)) 465 | self.label_12.setText(_translate("qgis2leaf", "Setup File:", None)) 466 | self.pushButton_3.setText(_translate("qgis2leaf", "...", None)) 467 | self.okButton_2.setText(_translate("qgis2leaf", "Save Setup", None)) 468 | self.okButton_3.setText(_translate("qgis2leaf", "Load Setup", None)) 469 | self.pushButton_4.setText(_translate("qgis2leaf", "...", None)) 470 | self.label_13.setText(_translate("qgis2leaf", "Setup File:", None)) 471 | self.textBrowser_2.setHtml(_translate("qgis2leaf", "\n" 472 | "\n" 475 | "

You can save and load your settings using this dialog. Please keep in mind: Layers and layer order will not be saved nor restored.

", None)) 476 | self.tab_2.setTabText(self.tab_2.indexOf(self.tab_settings), _translate("qgis2leaf", "Settings ", None)) 477 | self.textBrowser.setHtml(_translate("qgis2leaf", "\n" 478 | "\n" 481 | "

General help:

\n" 482 | "

QGIS2leaf creates a webmap from your current QGIS vector features and rasters. Therefore it tries to copy the current vector styles to styles, leaflet will understand. If your data has an attribute called html_exp it will use this for the popup content. Otherwise it will create a simple table from all of your attributes and values. label_exp will be used to fill labels if not defined by the label section itself. Furthermore you can define an icon for your point layers using an attribute called icon_exp. Each feature should have an absolute path on your current system or provide a link to the image (preferable *.svg or *.png). You may find suitable examples in the test_data folder.

\n" 483 | "

When you\'re interested in building a legend as well, you need to fill the column legend_exp with a text and legend_ico with the path to an icon which should be shown in the legend for the particular layer. This works only for local layers and non-raster layers. See the example files for details.

\n" 484 | "

Raster images will be translated to EPSG:4326/jpg using GDAL python bindings. Attention: Make sure to store the raster as rendered image prior exporting it with qgis2leaf!

\n" 485 | "

* The export with leaflet matching the project CRS is beta!!!

\n" 486 | "

GUI help:

\n" 487 | "
  • Press "get layers" to add/reload your vector layers to the plugin. You can select the layers to export.
  • \n" 488 | "
  • QGIS2leaf will export your QGIS data as geoJSON. Use Coordinate precision to define the needed precision of coordinates. Higher precision will enable sub-milimeter precision but also increased file sizes and lower webmap performance.
  • \n" 489 | "
  • Your QGIS project might have a WFS embedded. Check Encode to JSON to create a local copy of the WFS. If unchecked leaflet will use the same WFS in its map.
  • \n" 490 | "
  • Use Export selected only to restrict your data to selected items only. This applies to all layers!
  • \n" 491 | "
  • Opacity of raster images in your map can be changed using the Opacity control which is a slider below your map.
  • \n" 492 | "
  • Frame width defines the map dimension in the html page. Toggle between given pixel values or full screen which corresponds to 100% width of your browser. Press Get Size to set the dimensions of the webmap according to your current QGIS map window.
  • \n" 493 | "
  • Extent: canvas extent - QGIS canvas will influence initial leaflet view / choose layer extent to set the leaflet webmap extent to the extent of all vector layers. Check Locate to set the center of the webmap to the user position (determined by GPS/3G/IP).
  • \n" 494 | "
  • For large datasets set the visible layers to "show none". Visibility can be toggled in the webmap afterwards as you have a nice layer switcher.
  • \n" 495 | "
  • Choose some of the available basemaps. If you select none, your layers will be exported with a blank background.
  • \n" 496 | "
  • As output project folder you should choose a separate folder. There will be a designated folder in it with your current export files and folders.
  • \n" 497 | "
  • Webpage name will be visible in the Tab-header of your webpage. It is extracted from your project title but you can alter it.
  • \n" 498 | "
  • Webmap heading will be displayed in an info box in your webmap. It is extracted from your project title but you can alter it.
\n" 499 | "
  • Webmap subheading will be displayed in an info box in your webmap if webmap heading is provided. It is extracted from your project title but you can alter it.
", None)) 500 | self.tab_2.setTabText(self.tab_2.indexOf(self.tab_help), _translate("qgis2leaf", "Help", None)) 501 | self.actionLoadList.setText(_translate("qgis2leaf", "loadList", None)) 502 | 503 | --------------------------------------------------------------------------------