enricofer / go2streetview

22 stars 22 forks source link

update google map api #89

Closed yvo2m closed 1 month ago

yvo2m commented 1 month ago

quick dirty fix :

enricofer commented 1 month ago

Hi, your contribution is much appreciated! Unfortunately I was already working on dropping Qt webkit and the new release is almost finished and all plugin features are now fixed, but you can still help me to test it and report issues: https://github.com/enricofer/go2streetview/tree/v10 only the pdf print,remains to be fixed. But it's an obsolete feature and we can think to remove from plugin. Thank you anyway.

yvo2m commented 1 month ago

Great you use QWebChannel for passing message from JS to python !

Some comments :

in res\g2sv.html, line 93: remove "v=3.53" (and the '&' line 94)

for the pdf print, line 479: change : webview.page().mainFrame().render(painter) to webview.render(painter)

enricofer commented 1 month ago

If you agree I could disable print menu item for now, in the meanwhile you could investigate how to reimplement and improve it

yvo2m commented 1 month ago

yes you can, but it was working in my patch ( except for the integration of the BE view)

yvo2m commented 1 month ago

Another issue I corrected, if you navigate in the SV window, then you resize the windows, you came back to the first position (quite annoying)

corrected by adding in setPosition (go2streetview.py), line 670 :

    self.pointWgs84 = actualWGS84 #save position in case of window resize
    self.heading=float(self.actualPOV['heading']) #save heading in case of window resize
yvo2m commented 1 month ago

If you don't mind, I will make minors comment there, instead of smalls Pull Request.

yvo2m commented 1 month ago

in setPosition (go2streetview.py), line 677 : self.canvas.setCenter(actualSRS) always make my QGIS crashes

enricofer commented 1 month ago

I see, but at the moment I don't realize why. I would hide the option for now.

yvo2m commented 1 month ago

I found a bug, when you click an drag on the map to open a SV view, the heading drawn on the map is always to the north. The heading is correct once you move in the SV view.

Replacing all the window.status = JSON.stringify by backend.catchJSevents(JSON.stringify in the g2sv.html solve the issue.

And could you please take into account this :

Another issue I corrected, if you navigate in the SV window, then you resize the windows, you came back to the first position (quite annoying)

corrected by adding in setPosition (go2streetview.py), line 670 :

    self.pointWgs84 = actualWGS84 #save position in case of window resize
    self.heading=float(self.actualPOV['heading']) #save heading in case of window resize
enricofer commented 1 month ago

in setPosition (go2streetview.py), line 677 : self.canvas.setCenter(actualSRS) always make my QGIS crashes

fixed

I found a bug, when you click an drag on the map to open a SV view, the heading drawn on the map is always to the north. The heading is correct once you move in the SV view.

Replacing all the window.status = JSON.stringify by backend.catchJSevents(JSON.stringify in the g2sv.html solve the issue.

I think this was related to digitize on streetview new feature (green spot) and I have already fixed it

And could you please take into account this :

Another issue I corrected, if you navigate in the SV window, then you resize the windows, you came back to the first position (quite annoying) corrected by adding in setPosition (go2streetview.py), line 670 :

    self.pointWgs84 = actualWGS84 #save position in case of window resize
    self.heading=float(self.actualPOV['heading']) #save heading in case of window resize

Ok. I see what you mean. Why don't you send a PR ? Now master branch should be aligned with last plugin version