0

I am doing a beauty salons website for my client using Wordpress. I have created custom post type for beauty salons.

Now I need to create a page where user can enter a place for example a city and select number of results or a radius in terms of Kilometers.

Once we have the results we need to show all results on a map. We also have a filters to filter the search using some of meta keys.

I am not good at javascript and/or Google Map API v 3. How to do above? I do not need full code I just need guidelines. or is there some plugin which do the same?

Imran
  • 1,064
  • 1
  • 20
  • 41
  • I found a website where you can see same functionality in action but this website is not in wordpress: http://www.tastecard.co.uk/search#/ – Imran Jul 15 '13 at 15:46

1 Answers1

1

You would need all your coords in the db to locate which locations to map

Then you can search for all locations between +/- x kilometers north / south and +/- x kilometers east / west

If you then want to find the closest you can use Pythagoras theorum to find out the distance to each point

Anigel
  • 3,365
  • 1
  • 16
  • 23
  • I have the coords in the db. How to find +/- x kilometers north / south and +/- x kilometers east / west. Do I need to add x kilometers to lat to find + x kilometers? – Imran Jul 15 '13 at 15:57
  • 1
    http://stackoverflow.com/questions/1253499/simple-calculations-for-working-with-lat-lon-km-distance – Anigel Jul 15 '13 at 15:58