onaio / reveal-frontend

WebUI for the Reveal epidemiological surveillance platform
8 stars 4 forks source link

Can we load the IRS planning map progressively #286

Closed moshthepitt closed 4 years ago

moshthepitt commented 5 years ago

@cKellyDesign do you think it would be a good idea to load the IRS planning map progressively?

i.e.

cKellyDesign commented 5 years ago

@moshthepitt I had thought of this and for simplicity's sake I did all the loading up front, but it would be nice if we could quickly fetch Jurisdictions with geoms only as they are needed. I think the tradeoff here is making the user wait while subsequent geoms load as the user interacts with the page vs if we do it all up front the user can navigate around at will.

mberg commented 5 years ago

We should only be showing the map one level at a time and just for the jurisdictions in the list. I think right we may be loading a lot more jurisdications then that.

On Fri, Aug 2, 2019 at 12:49 PM Conor Kelly notifications@github.com wrote:

@moshthepitt https://github.com/moshthepitt I had thought of this and for simplicity's sake I did all the loading up front, but it would be nice if we could quickly fetch Jurisdictions with geoms only as they are needed. I think the tradeoff here is making the user wait while subsequent geoms load as the user interacts with the page vs if we do it all up front the user can navigate around at will.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/onaio/reveal-frontend/issues/286?email_source=notifications&email_token=AAAOEQMR3K74BKXYFFRRYATQCRQS3A5CNFSM4II7JNXKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3OI6NQ#issuecomment-517771062, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAOEQNV5S7R6COM4XI54XLQCRQS3ANCNFSM4II7JNXA .

cKellyDesign commented 5 years ago

So I think it depends on the actual use case around planning IRS campaigns:

Also, if we are doing this we will probably need to add an isLoadingGeoms flag to the store so the system knows there's more coming!

cKellyDesign commented 5 years ago

We should only be showing the map one level at a time

@mberg on staging this is the current functionality for Namibia since it is using tilesets, and I was able to extend this functionality to maps without tilesets as of 5c7e042 (in PR#281) just a few minutes ago (so it's not included in v0.1.2).

cKellyDesign commented 5 years ago

Latest update on this is that we can accomplish this by using the findByIdWithChildren to "find" the level 0 jurisdiction by ID and all of it's children. This endpoint allows us to pull more than 1000 jurisdictions at a time so the requests may get large, but no larger than from Superset.

Blocker: Zambia does not have a level 0 jurisdiction in OpenSRP

moshthepitt commented 4 years ago

This was done as part of https://github.com/onaio/reveal-frontend/issues/892 in #788