sourcepole / qgis-openlayers-plugin

Openlayers plugin for QGIS
GNU General Public License v2.0
172 stars 108 forks source link

port to qt5? #37

Closed attractedtofire closed 4 years ago

attractedtofire commented 6 years ago

Are there any plans to port the plugin to QT5 in the future? QtWebKit for Qt 4 seems to have been unmaintained for quite some time now.

pka commented 6 years ago

We will port the plugin to QGIS 3 (QT5+Python 3) as soon as the API is freezed.

fvalenduc commented 6 years ago

According to this: https://www.qgis.org/en/site/getinvolved/development/roadmap.html#release-schedule The freeze occured on 27/10/2017, or I am wrong ? Any news on the port to QT 5 ?

pka commented 6 years ago

Unfortunately, the freeze is neither a feature freeze nor an API freeze. Core API is still in flux.

h4k1m0u commented 6 years ago

Sorry I'm quite new around, but I couldn't find any information about the date when the API will freeze (is it around when QGIS3 is out, i.e. 23/02/2018 according to the roadmap)?

brylie commented 6 years ago

Now that QGIS 3.0 has been released, it seems like a good time to start this upgrade process. What tasks are involved? How may I help?

pka commented 6 years ago

The release finally happenend, hurray! There are two main tasks: porting the JavaScript based functionality to QGIS 3 and migrating the GDAL layers to the new XYZ layers. Help on any tasks would be greatly appreciated! Currently we're working on customer projects with higher priority, but if there is a PR, we would merge as quick as possible.

brylie commented 6 years ago

here are two main tasks: porting the JavaScript based functionality to QGIS 3 and migrating the GDAL layers to the new XYZ layers. Help on any tasks would be greatly appreciated!

@pka, would you mind opening (and linking to) some explicit tasks in this issue queue, so we can tackle the upgrade incrementally?

pka commented 6 years ago

Ok, I made a separate issue #45 for the XYZ migration, which is not strictly necessarily. Let's track the main migration to QGIS 3 in this ticket.

brylie commented 6 years ago

porting the JavaScript based functionality to QGIS 3

Since we will be tracking the QGIS 3 migration in this ticket, would you explain a bit more about the changes necessary for the JavaScript functionality? I am new to QGIS development, and would appreciate guidance in this matter. Are there some example files or methods that we should be considering?

Miriup commented 6 years ago

I haven't developed for QGIS yet, but I also previously took a look at upgrading the OpenLayers plugin to QT5. I would start with:

Then you load the plugin and see where it fails, then google for the error. Most of the times someone will have faced that particular issue already in some other software. Follow their suggestions. Then correct the OpenLayers plugin and move onto the next quirk. Something like that. ;-)

pka commented 6 years ago

@brylie This plugin will not be the easiest one to start with QGIS development, but if you're fluent with Python then it's certainly possible. The best starting point for porting plugins is https://github.com/qgis/QGIS/wiki/Plugin-migration-to-QGIS-3

pka commented 6 years ago

Port to QGIS 3 is now in master branch. Shall we publish an 'experimental' version first, for broader testing?

fvalenduc commented 6 years ago

I tried it on windows and it fails with this error:

Impossible de charger l'extension 'openlayers_plugin' provoque une erreur lors de l'appel à sa méthode classFactory()

ImportError: cannot import name 'OpenlayersPlugin' Traceback (most recent call last): File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python\qgis\utils.py", line 336, in startPlugin plugins[packageName] = package.classFactory(iface) File "C:/Users/François/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\openlayers_plugin__init__.py", line 25, in classFactory from openlayers_plugin import OpenlayersPlugin ImportError: cannot import name 'OpenlayersPlugin'

Version de Python : 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 08:06:12) [MSC v.1900 64 bit (AMD64)] Version de QGIS : 3.0.1-Girona Girona, a86bec25eb

Chemin Python : C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python C:/Users/François/AppData/Roaming/QGIS/QGIS3\profiles\default/python C:/Users/François/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins C:\Program Files\QGIS 3.0\bin\python36.zip C:\PROGRA~1\QGIS3~1.0\apps\Python36\DLLs C:\PROGRA~1\QGIS3~1.0\apps\Python36\lib C:\Program Files\QGIS 3.0\bin C:\PROGRA~1\QGIS3~1.0\apps\Python36 C:\PROGRA~1\QGIS3~1.0\apps\Python36\lib\site-packages C:/Users/François/AppData/Roaming/QGIS/QGIS3\profiles\default/python%

I downloaded the git tree and I ran make package VERSION=v1.4.8 (on linux) to create the zip file. Did I do something wrong ?

fvalenduc commented 6 years ago

I indeed did something wrong, 1.4.8 was not the correct version... With the correct version, It seems to work ok, after very limited testing.

pka commented 6 years ago

Port to QGIS 3 is now published as experimental version 2.0.0. Please test and give feedback in this ticket.

HusseinKabbout commented 4 years ago

Since there hasn't been much feedback in this issue I will be closing it. Please create a new issue if you encounter any problems or have any questions regarding the plugin.