-
-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Map.onChangeCenter() to QGIS plugin #83
Comments
Let's elaborate a bit: Can you provide a few scenarios on how this will be used? In Code Editor, when the user hits run, all event handlers defined in that script are subscribed, and when the user re-runs that script - event handlers are re-subscribed from scratch. This feature can be probably implemented in QGIS in a similar way if I manage to find how to handle the Run Script button signal. And then unsubscribe all Map.on* events when the user hits Run. Would that be acceptable? |
Here how a prototype looks like, a bit slow with EE calls on every center change: map_on_change_center.mp4 |
The example I have is: I need to navigate through many points (9k) and I don't want to load images (Sentinel 2) for a large area (an entire country, i.e. Brazil) or click on the Run button for each point. Map.onChangeCenter() seems to be the best way to do this in QGIS. |
Hmm, I still don't see how Map.onChangeCenter() would help here, if you plan to re-run EE processing every time you change map center - it could be slow. It might be better to have some more explicit way to trigger processing for a given point (or points), e.g. select a point in a layer to trigger EE update or something using QGIS Python API, like run a script that will iterate over points in the current view (or over selected points only) and run some EE processing for all of them, putting results into a single resulting layer. For QGIS API see for example https://docs.qgis.org/3.4/pdf/en/QGIS-3.4-PyQGISDeveloperCookbook-en.pdf |
I will try to iterate over the selected feature. It seems to be the best way to do what I want 😅 |
No description provided.
The text was updated successfully, but these errors were encountered: