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,094
  • 1
  • 21
  • 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

2 Answers2

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,435
  • 1
  • 17
  • 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
-1

Integrating WordPress search with Google Maps involves combining the functionality of WordPress search with the Google Maps API to display the search results on a map. Here are the steps to do this:

Get a Google Maps API Key: To use the Google Maps API, you need to get an API key from the Google Developers Console. This key allows you to use the API on your website.

Install a plugin for integrating Google Maps with WordPress: There are several plugins available that allow you to easily integrate Google Maps with WordPress. For example, you can use the "Google Maps Easy" plugin.

Create a search form: You need to create a search form in WordPress that allows users to enter their search criteria. You can use a plugin like "Contact Form 7" to create the form.

Get the search results: Once you have the search form, you can use the WordPress search functionality to retrieve the search results. You can then use the Google Maps API to display the results on a map.

Display the search results on the map: You can use the Google Maps API to display the search results as markers on the map. You can also use the API to provide more information about each marker, such as a pop-up window with details about the branch.

Note: The exact steps for integrating WordPress search with Google Maps may vary depending on the plugin you use and the design of your website. It's always a good idea to consult the plugin's documentation and the Google Maps API documentation for more information.