Searching Within Submitted Zip Codes By Members (1 post)

  1. parham90
    Posted 4 years ago #

    Hi there,

    I am trying to build a directory of museums with buddyPress and s2Member, where every museum that signs up enters a zip code. A user who is just visiting the website will then enter their zip code, and the closest museums to them will be returned, marked on the Google Map. Now, I have some questions:

    1. Is there an extension that already does this? I have seen ones that allow the admin to enter the zip codes directly, but what I need is for zip codes to be retrieved from the profiles of all the museums in the database.

    2. I expect I should put my latitude/longitude retrieval code in a function that will be registered as a user_register action?

    3. Where should I store the latitude and longitude I get from passing the zip code and address to the Google Maps API? I have thought of using user_add_meta(), but I'm not sure how easy it is to later access by SQL. I will later on need to calculate the closest museums using the distance-calculation algorithms in SQL, so they need to be easily accessible.


Topic Closed

This topic has been closed to new replies.

About this Topic