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.
   2. 
   
   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.
   
Which method is preferable? I estimate there will be maybe 200k-300k 
records in my database.

-- 
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 [email protected].
To post to this group, send email to [email protected].
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to