Git Product home page Git Product logo

qgis2leaf's People

Contributors

johnjohndoe avatar mtravis avatar rcura avatar riccardoklinger avatar spatialthoughts avatar tomchadwin avatar

Stargazers

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

Watchers

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

qgis2leaf's Issues

Unicode issue on creating...

Traceback (most recent call last):
File "/home/ubuntu/.qgis2/python/plugins/qgis2leaf/qgis2leafdialog.py", line 85, in export2leaf
qgis2leaf_exec(self.outFileName, self.basemapName, self.width, self.height, self.extent, self.full_screen)
File "/home/ubuntu/.qgis2/python/plugins/qgis2leaf/qgis2leaf_exec.py", line 110, in qgis2leaf_exec
qgis.core.QgsVectorFileWriter.writeAsVectorFormat(i,dataStore + os.sep + str(i.name()) + '.js', 'utf-8', exp_crs, 'GeoJson')
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe0' in position 19: ordinal not in range(128)

Versione Python:
2.7.3 (default, Feb 27 2014, 20:09:21)
[GCC 4.6.3]

redesign of logo

unfortunately the logo has no alpha layer (the white frame around the logo needs to be marked as transparent. this needs a redesign:
qgis 2 0 1-dufour_2014-04-28_08-09-19

Html structure

The index.html should be written with more structure as it makes it easier to read for the developer who would like to enhance the webmap.

Symbol is not customized

the symbol of the plugin is the standard symbol. there should be a symbol which identifies the functionality more.

Make map full screen

You might want to add an option to make map full screen.

You can do this by adding:

<style>
    body {
        padding: 0;
        margin: 0;
    }
    html, body, #map {
        height: 100%;
        width: 100%;
    }
</style>

and removing the css in currently in the map div.

Data source not loading

When loading index.html I get the following in my console:

Not allowed to load local resource: file:///C:/wamp/www/qgis2leaf/data/Boundary.js

I changed to: <script src='data/Boundary.js' ></script> instead and this worked fine.

Perhaps you could change the plugin to do this.

Matt

Leaflet mobile

Leaflet webmap can be altered very easily to work smoothly on mobile systems. It justed needs some style statements in the beginning of the file. Enhance the source code to publiah a mobile frendly version.

exporting many layer to leaflet

I want to export around 160 layers to leaflet using qgis2leaf. But, just let me to export only 2 layers. When I try to export more than 2 layers, appears the following message:


Traceback (most recent call last):
  File "C:/Users/Administrador/.qgis2/python/plugins\qgis2leaf\qgis2leafdialog.py", line 104, in export2leaf
    qgis2leaf_exec(self.outFileName, self.basemapName, self.width, self.height, self.extent, self.full_screen, self.layer_list, self.visible)
  File "C:/Users/Administrador/.qgis2/python/plugins\qgis2leaf\qgis2leaf_exec.py", line 289, in qgis2leaf_exec
    print table
IOError: [Errno 9] Bad file descriptor

Python version:
2.7.4 (default, Apr  6 2013, 19:54:46) [MSC v.1500 32 bit (Intel)]

QGIS version:
2.2.0-Valmiera Valmiera, c3a2817

Python path: ['C:/PROGRA~1/QGISVA~1/apps/qgis/./python/plugins\processing', 'C:/PROGRA~1/QGISVA~1/apps/qgis/./python', u'C:/Users/Administrador/.qgis2/python', u'C:/Users/Administrador/.qgis2/python/plugins', 'C:/PROGRA~1/QGISVA~1/apps/qgis/./python/plugins', 'C:\PROGRA~1\QGISVA~1\bin\python27.zip', 'C:\PROGRA~1\QGISVA~1\apps\Python27\DLLs', 'C:\PROGRA~1\QGISVA~1\apps\Python27\lib', 'C:\PROGRA~1\QGISVA~1\apps\Python27\lib\plat-win', 'C:\PROGRA~1\QGISVA~1\apps\Python27\lib\lib-tk', 'C:\PROGRA~1\QGISVA~1\bin', 'C:\PROGRA~1\QGISVA~1\apps\Python27', 'C:\PROGRA~1\QGISVA~1\apps\Python27\lib\site-packages', 'C:\PROGRA~1\QGISVA~1\apps\Python27\lib\site-packages\PIL', 'C:\PROGRA~1\QGISVA~1\apps\Python27\lib\site-packages\win32', 'C:\PROGRA~1\QGISVA~1\apps\Python27\lib\site-packages\win32\lib', 'C:\PROGRA~1\QGISVA~1\apps\Python27\lib\site-packages\Pythonwin', 'C:\PROGRA~1\QGISVA~1\apps\Python27\lib\site-packages\Shapely-1.2.18-py2.7-win32.egg', 'C:\PROGRA~1\QGISVA~1\apps\Python27\lib\site-packages\wx-2.8-msw-unicode', 'C:\PROGRA~1\QGISVA~1\apps\qgis\python\plugins\fTools\tools```

The files are on this url: http://www.sendspace.com/file/jbcode

Ensure data is exported in WGS84

Firstly, thanks for creating this plugin. I'm a massive fan of both leaflet and QGIS so this is very welcome.

Can I just ask if you have though about adding some functionality to the plugin that checks the CRS of the data and makes sure its exporting as WGS84. I think this should be possible using the QGIS API.

This would beneficial to users that have all their data in a different CRS.

Thanks

Matt

Default all layers are active , on first loading the browser is overloaded...

I've exported some layers on my town, points and lines, the browser (firefox) freeze
Having default all layers active can be the cause of overloading browser visualization... ?
If yes: can we have an option to manage the ".addTo(map);" on every single layer.
With default: "only one overlay layer has to be added to map by default".

Testing it: disabling into generate index.html code the ".addTo(map);" default option on exported layers, made things go better...

so in my test i disabled the row n. 306 in qgis2leaf_exec.py

#f5.write("""exp_""" + re.sub('[\W_]+', '', i.name()) + """JSON.addTo(map);""")

and i can load a lot of layers without browser freeze... after i will activate by layer control button.

Thank

get Layers

Would be nice if I could get layers then have the option to remove layers I don't want to include in the final output

title of plugin is shown wrong

screenshot from 2014-04-25 22 04 19
I've changed the GUI (ui-file) to show the full name of the plugin as "QGIS 2 Leaflet" but it is not shown correct in the GUI in QGIS.

works under windows

the plugin meant to work under windows. especially writing a folder structure is os specific.
Environment: qgis 2.2
OS: windows 64bit and Windows 32bit!

Possibility of choosing popup text

It would be cool if there's an option to choose only an attribute which contains the popup text, for example:

  • compose a description for the feature in html inside a field "htmldesc"
  • in the plugin choose if export all the fields (as it works currently) or a single field ("htmldesc")
  • leaflet has popups with only this text if the latter is chosen

Dimensions of webmap

Enhance the UI to let the user define width and height of the webmap. Nevertheless there should be a default value given.

Don't check compiled python files into git

git should only be used for managing code, not binaries. As the .pyc binaries are compiled from python source files, the are not needed anyway. So it is best practice to add them to the .gitignore file.

Set a default value in output dir

I found would be great to have a default output dir value set /showed into dialog window.
I suggest you to set it to the system temp dir...

Best regard and thank for your work

help location

I see the help provides useful information for persons who used the plugin for the first time but the location takes a lot of space. How about adding a button where people can clic and a window with a help file opens?

Switch from geojson to topojson?

Qgis projects and shape files can get extremely large. Leaflet is capable to use topojson which are damn small compared to geojson. Shall we implement a switch for geojson/topojson?

layer list to export just part of the project

most user do have some temporary layers in their workspace. I think about a list of layers in the GUI which holds the list of layers. The list is defaulted to export every vector layer. by unchecking some of them it enables the user to export just a part of the workspace.

works under qgis 2.0

there was a user who had issues in installing it under qgis 2.0. does it work?

code check.

someone should look through the code to make sure there is no junk in it as it was coded using some templates.

Runtime error...

Not on all export... but i get on a layer...

Traceback (most recent call last):
File "/home/ubuntu/.qgis2/python/plugins/qgis2leaf/qgis2leafdialog.py", line 107, in export2leaf
qgis2leaf_exec(self.outFileName, self.basemapName, self.width, self.height, self.extent, self.full_screen, self.layer_list, self.visible)
File "/home/ubuntu/.qgis2/python/plugins/qgis2leaf/qgis2leaf_exec.py", line 149, in qgis2leaf_exec
line = line.replace(""""type": "Feature", "properties": { """,""""type": "Feature", "properties": { "color_qgis2leaf": '""" + color_str + """', "radius_qgis2leaf": """ + radius_str + """, "transp_qgis2leaf": """ + transp_str + """, "transp_fill_qgis2leaf": """ + transp_str2 + """, """ )
UnboundLocalError: local variable 'radius_str' referenced before assignment

Versione Python:
2.7.3 (default, Feb 27 2014, 20:09:21)
[GCC 4.6.3]

is a zip output interesting

some people might have a zip output at the end only or additionally to the folder structure. might this be of interest for the plugin?!

initial view looks ugly

after first load in firefox/chromium the map seems ugly:
screenshot from 2014-04-26 18 56 04

only after I've checked one feature popup the map was drawn properly:
screenshot from 2014-04-26 18 58 06

should be a leaflet issue

Recommend Projects

  • React photo React

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

  • Vue.js photo Vue.js

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

  • Typescript photo Typescript

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

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

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

Recommend Topics

  • javascript

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

  • web

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

  • server

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

  • Machine learning

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

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

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

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.