Create a custom location search with radius

Hello,

I’m trying to set up a search engine where users can search for an attraction based on the location of it.

For example, if they enter “Sydney”, all Sydney attractions will be displayed.

My problem comes from the fact that I want to add the radius from the searched location. For example, if the user enters Sydney, and chooses 25km, Sydney attractions and those within a 25km radius should be displayed.

For the moment I have created two databases, one with the details of the attractions (with their location), and another with the cities according to the radius. (e.g .: all the cities which are within a radius of 25km from Sydney, 50km, 100km, etc.)

I know I could do this easily with plugins from google, but I want to try to do it myself. I’m aiming for a small area, so I don’t think it should be too difficult.

I just want to get your ideas on how I could do this, since at this time I am unable to connect the two databases in my search. I have tried everything, and nothing seems to work. (the main problems come from the fact that in my database displaying the cities in the surrounding radius, it creates lists, which cannot be displayed in a RG which is connected with my first database (displaying the details of the attractions) .

Thanks for your help!

2 Likes