enricofer / go2mapillary

a plugin for displaying and extracting information from Mapillary street level imagery with QGIS (3.0)
GNU General Public License v3.0
34 stars 14 forks source link

Can't see imagery #16

Closed VincentROBBE closed 6 years ago

VincentROBBE commented 6 years ago

Hi,

Thanks and congratulations for your job ! I am trying to use the plugin with QGIS 3.2, windows 10 but i don't see imagery. Il seems "Cross origin requests are not supported.", see printscreen

capture

Bests !

cbeddow commented 6 years ago

I have the same issue, Windows 7 64-bit with QGIS 3.2.

It may be a CORS issue: https://www.thepolyglotdeveloper.com/2014/08/bypass-cors-errors-testing-apis-locally/

trandsalu commented 6 years ago

Hi! I’ve got exactly the same issue – QGIS 3.2.1/Windows 10: [cid:image001.jpg@01D43A1B.CFE8DE60] /Toomas

Från: Christopher Beddow notifications@github.com Skickat: den 22 augusti 2018 13:02 Till: enricofer/go2mapillary go2mapillary@noreply.github.com Kopia: Subscribed subscribed@noreply.github.com Ämne: Re: [enricofer/go2mapillary] Can't see imagery (#16)

I have the same issue, Windows 7 64-bit with QGIS 3.2.

It may be a CORS issue: https://www.thepolyglotdeveloper.com/2014/08/bypass-cors-errors-testing-apis-locally/

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/enricofer/go2mapillary/issues/16#issuecomment-414994884, or mute the threadhttps://github.com/notifications/unsubscribe-auth/Aj3r2mAaSTCze4MZemiyplKHPmY6kmD3ks5uTTo3gaJpZM4V4P2_.

enricofer commented 6 years ago

Cross Origin Requests are available when the remote serves the resource with Access-Control-Allow-Origin: * in http response header In our case, the plugin, reads the browser page in a QWebView (the QT5 web browser widget ) from a local file, that, for security reason should not have a response header (ther is no http server) as you can see from the following image screenshot 2018-08-27 11 31 28 Normally, in desktop browsers no header directive results in no CORS and the policy should be activated by an extension. The plugin uses QT5 Webkit as browser and I can't find any documentation for enabling CORS for local files, but in most QGIS systems, this is not a problem, and executing the html browser page from local file does not throw exception (but I don't know the reason why) So It should suffits to load html page from a public server for having CORS enabled, so I enabled github pages for this repository and branched the viewer code to point the QWebView widget, getting the following http response: screenshot 2018-08-27 11 48 44 Now you can test downloading https://raw.githubusercontent.com/enricofer/go2mapillary/cors/mapillary_viewer.py, substituting the original file in the go2mapillary plugin directory and reloading the plugin to see if imagery is visible. Please check it and let me know

VincentROBBE commented 6 years ago

It works ! Fabulous ! image

Thanks

trandsalu commented 6 years ago

Yes! Great! /Toomas

Från: VincentROBBE notifications@github.com Skickat: den 27 augusti 2018 12:25 Till: enricofer/go2mapillary go2mapillary@noreply.github.com Kopia: Toomas Randsalu Toomas.Randsalu@karlshamn.se; Comment comment@noreply.github.com Ämne: Re: [enricofer/go2mapillary] Can't see imagery (#16)

It works ! Fabulous ! [image]https://user-images.githubusercontent.com/5764250/44655086-315b9500-a9f4-11e8-98d5-0c57857544e2.png

Thanks

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/enricofer/go2mapillary/issues/16#issuecomment-416183642, or mute the threadhttps://github.com/notifications/unsubscribe-auth/Aj3r2uxB2iAfG7sbxKT7fS41yYWa3jZZks5uU8kWgaJpZM4V4P2_.

enricofer commented 6 years ago

Thanks all for submissions.

cbeddow commented 6 years ago

What should be the plugin directory? I am having trouble finding it

enricofer commented 6 years ago

https://gis.stackexchange.com/questions/274311/qgis-3-plugin-folder-location

cbeddow commented 6 years ago

Success for me too, amazing! Thanks @enricofer !

iamnunocaldeira commented 6 years ago

perfect, finally works on my side with this fix. thanks enricofer

andreasneumann commented 6 years ago

Hi @enricofer Many thanks for the plugin.

Note that I was also affected by this issue. The green Mapillary layers loaded fine. But I got no images - the panel remained black. After replacing mapillary_viewer.py - everything worked as expected.

Again - many thanks for this useful plugin! Andreas

enricofer commented 6 years ago

I just submitted a new release on repository: http://plugins.qgis.org/plugins/go2mapillary/

andreasneumann commented 6 years ago

Excellent - thanks @enricofer

BTW: I learned about you plugin at the FOSS4G conference in Dar es Salaam. There was a presentation from a Mapillary representative.

enricofer commented 6 years ago

I'm happy to know you find it interesting. @cbeddow recently told me about his presentation at foss4g 2018 and I delegate him to show the plugin Mapillary built a wide tools ecosystem around his imagery service and most of the plugin features come from their vision. feel free to submit me any issue report or enhancement request.