enricofer / go2streetview

22 stars 22 forks source link

get_streetview_url doesn't work with atlas layout #63

Closed Theogron closed 2 years ago

Theogron commented 2 years ago

Hello,

I am trying to use the function get_streetview_url(1) with qgis.

I have a multipolygon layer (buildings). I have created a new layout wih an atlas in qgis.

I am trying to configure an oriented street view picture of my buildings with the function get_streetview_url(1) incremented in an HTML objetct.

Unfortunately, the response is always the same : 'no imagery for location'

Am i using it well ?

image

enricofer commented 2 years ago

the expression function basically creates a streetview static view looking to the centroid of the provided geometry from the nearest site covered by streetview service. It makes use of getNearestSVLocation js api method from within the html page: https://github.com/enricofer/go2streetview/blob/9c6646d76de8557de635c1ff6cc8b6638e0f5923/go2streetview.py#L410 getPanorama If the expression is returning 'no imagery for location' maybe google car is not passed by that site or the centroid of a big requested polygon is too far from covered streets. Try to verify this enabling coverage layer and using a not too far target geometry

Theogron commented 2 years ago

Thank you for your quick answer :)

I have made a test and have created litlles polygons just near from a verified street-view point.

The results in Qgis atlas are the sames as i have mentioned in my previous coment.

image

image

enricofer commented 2 years ago

Static url generator needed some care. here is the fix: https://github.com/enricofer/go2streetview/commit/213ce3868467d1ae50f905f474c2dbbc40542a5a And now the static url is correctly generated. Now you should reload the plugin from github master source. Keep in mind that something changed in streetview static api that now has to be explicity enabled, and you have to give some annoying permissions on google api console.

Thanks for submission.

Theogron commented 2 years ago

Thank you very much for your answer and your sharing :)

Theogron commented 2 years ago

Sory but i have a problem with the installation of the last release from https://github.com/enricofer/go2streetview/releases

image

enricofer commented 2 years ago

you have to rename the folder from go2streeview-8 to go2streeview

enricofer commented 2 years ago

follow the gudelines for installing a plugin https://docs.qgis.org/3.22/it/docs/pyqgis_developer_cookbook/plugins/index.html#developing-plugins

Theogron commented 2 years ago

Thank you. The instalation succeed with the modified name.

I modified the 2 docs you've fixed and ziped the folder to instal it with the qgis console extension.

Still have the same message 'no imagery for location'.

Must be a wrong way to run it. I'll dig it and find the problem later.

Thank you for your time!