Jump to content

How to use a user's known location?


Christopher Ambler

Recommended Posts

My site has every user's latitude and longitude already stored (as custom fields in JomSocial).

 

I would very much like to be able to use these for proximity search such that users can simply say "Hey, show me all listings within N miles of me."

 

The proximity search, as it stands now, requires the user to enter their address every time they want to do a search. Is there a way for the system to remember where the user's default location is? Preferably by my being able to tell is where that data is stored (using the JomSocial fields)? That's just a preference, of course - if JReviews stored lat/lon for every user someplace, I could very easily modify my code that sets the lat/lon to push it into whatever table JReviews expects to find it.

 

But storing that so that the user need not enter it every time would be very helpful. Is this possible?

Link to comment
×
×
  • Create New...