On Mon, Dec 18, 2017 at 5:36 PM, Jack <valachio...@gmail.com> wrote:

> I am building a real estate listings map, which dynamically refreshes its
> filter whenever the user moves the map. The page never refreshes when a
> change is made. Think Zillow/Trulia
> <https://www.zillow.com/homes/recently_sold/6m_days/globalrelevanceex_sort/40.723183,-73.999425,40.721191,-74.002858_rect/17_zm/>
> .
>
> There are 2 main filters:
>
>    - Filter properties within the user's viewport
>    - Filter properties according to user's custom filter (e.g. property
>    type, # of bedrooms, etc.)
>
> I see 2 methods of approaching this problem.
>
>    1.
>
>    On initial visit, pass ALL properties in the database to the user. And
>    then filter these properties whenever the user moves his map or changes his
>    filter selection.
>
> This may delay the "first page" or initialization but it would produce a
better experience after

>
>    1.
>
>    Create an ajax call whenever the user moves his map or changes his
>    filter selection. The ajax call will only return the properties that match
>    the user's current requirements.
>
> This would create more traffic to your server, depending on the roundtrip
length it may affect the user experience and your server workload, but it
would load faster and for "short navigations spans" might be better

> Which method is preferable? I estimate there will be maybe 200k-300k
> records in my database.
>
Depends on which you want to prioritize or target :)


> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/7e6179d4-2274-4aec-aa83-27fbfdc1238c%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/7e6179d4-2274-4aec-aa83-27fbfdc1238c%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2BFDnhKbYseVFtQBvB3d_7C3TLJeHH4o1%2BQ-X6KNN3OB1MnbTQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to