How can I... (Google Maps)

Status
Not open for further replies.

doomdragon6

Staff member
Hidy ho, hoes.

I'm looking to make something where, on a website, there is form where someone can put in their address, zip code, or whatever, and have Google Maps find the nearest ___ to them.

The ___ would be something that I've set up that are not in any way the same thing, and there would be multiple of them.

Let's say, for example, I want to find restaurants that all have purple walls. (I'm going for absurd here.) Obviously you can't search for "purple-walled restaurants", but you, say, KNOW that Olive Garden has purple walls (they don't), so you can make the map find all the Olive Gardens. And Restaurants 2 and 3 also have purple walls. And Local Restaurant 1, which I've manually indicated as opposed to a mass chain search, has purple walls.

Then say I want people to be able to rate not the restaurant, but the purple walls on a scale of 1 to 5 and maybe even leave a review on the purple walls.

I know Google Maps doesn't inherently have this functionality, but how can I do something like this? I know they have placemarkers, but they needed to be added individually by hand.
 

doomdragon6

Staff member
Yes, but it needs to be a lot of different places.

Well either way, I googled and found no way to do this at the moment the way I want to, so we can go ahead and delete this thread. Thankee.
 
It requires programming and a database if you have a large dataset to search through. I don't know of any off-the-shelf stuff that does this for you, but I'm sure it exists. I've done it before for clients, it's not hard, but it is somewhat time consuming depending on all the aspects of the project.

I'd be tempted to hit it with PHP and MySQL (since it's widely available with cheap webhosting). After filling out the database with the latitude and longitude of each location, the searchable parameters, the address, and any other information you want to display (hours of operation, phone, image link, etc) then the PHP code displays a form asking for the user's location (zip, address, lat/lon/etc) and the other parameters they want to search for.

For instance, one might be interested in kid friendly restaurants. The database contains a list of restaurants that in some way or another cater to kids. It might contains mcdonalds, chuck e cheese, joe's crab shack. and even play centers or stores that happen to serve food and have interesting stuff for kids like jungle java and ikea. The database would also hold whether there's a playplace, and if there are any kids-eat-free days, whether they are willing to host parties, etc.

So in this case the form contains checkboxes for play area, whether the restaurant serves a full meal or if a cafe style light meal is fine, and if they host parties. It also contains a way for the user to input a location, such as a zip code, city state, or lat/lon (and if well done, it automatically uses the iphone or android's built in location ability so it can get the user's current location if visiting via mobile device).

Once submitted, the PHP code composes an SQL query that returns only those restaurants with the required features that are within a given distance to the user's input location. It then sends the response webpage with a google map and code to place all those locations on the map, and give the user the ability to click on them to get additional info (restaurant amenities, phone, hours, reviews, etc).

It would require a few hundred lines of code and many hours setting up the database for a simple backend that supported this. More time if you want it to look pretty, integrate it with some other web frontend or existing website, or make it mobile device friendly.

If you are starting from scratch, then there is probably a google maps book that will get you started with basic examples. Most PHP books will also cover the basics, and some will even use google maps as and example for this. It's a bit of work, but it's nothing particularly difficult - just lots of little pieces to fit together.
 

doomdragon6

Staff member
Interesting, though mostly over my head. Out of curiosity, if I were the type to just throw money at the things I want, what would hiring someone to do something like that cost? Even if it was just the system, and I put in all the locations myself.
 
Interesting, though mostly over my head. Out of curiosity, if I were the type to just throw money at the things I want, what would hiring someone to do something like that cost? Even if it was just the system, and I put in all the locations myself.
I suspect there are examples or even open source packages that would do what you need, for instance:

http://code.google.com/apis/maps/articles/phpsqlsearch.html

Unfortunately it's not a plug and play situation - you'd still need to understand how to deal with the code and the server to get it up and running.

If you run a content management system already, you might be able to find a module to do what you need. I know Drupal has one, and I suspect wordpress has one.

A very simple implementation would run me about 5-10 hours, and so cost about $450 to $900 if I were to bid on it. I know there are websites for consultants where you name your price and see if someone will do the work for you - this kind of job should be a quick $100-$200 for an outsourced consultant - I don't think this kind of project requires an expert.
Added at: 23:26
You can find a lot of places that connect freelance programmers with projects by doing a google search for "rent a coder"

https://www.google.com/search?q=rent a coder
Added at: 23:31
Of course, there are lots of buyer beware stories about such sites, but if it's a small project you are just playing with, it might be worth it. If it's important, vet your coder thoroughly.
 
Status
Not open for further replies.
Top