March 12th, 2013, 02:56 AM
Showing hotels from database on google map
I need some advice on what would be the best approach to create a google map that shows hotels from my database and put a pin there for each hotel. Something like this (click on the map tab).
I have address field (which may not be the best option, is it?) or I may have to work with alttude latitude.
Anyways please let me kno wyour thought it could save me a lot of time before I begin.
March 12th, 2013, 07:13 AM
start by signing up for a google maps api key
Then start to read their documentation.
At some point you'll want to output your list as XML or JSON.
In 2007/2008 I made the first version of this. I haven't worked there since 2008, so it's evolved a little bit (backwards IIMO)
Comments on this post
March 12th, 2013, 02:39 PM
It's better if you have a latitude / longitude value instead of an address. I believe Google Map's geocoding API has some fairly low limits as far as how many addresses you can geocode per day (I want to say 1000/day although I can't remember exactly), and the cost of an enterprise license, which raises that limit, is pretty high (I think it was 5-figures).
March 12th, 2013, 06:18 PM
I have already made the columns and everything works the issue is it is not automated enough> I send users to a website to get their alt, lat and put in hotel profiles. I also find address often not stable. They miss spell and put in complete address.
Originally Posted by E-Oreo
March 12th, 2013, 06:33 PM
Googles geocoding API does return a list of addresses that it thinks are what you are looking for if it can't find a direct match, so you can use that list in your app to ask the user which of the returned addresses most closely matches theirs. If there's only one address returned you can use that address straight away but if there's multiple addresses returned, you can ask the user which one is best. Google Maps works the same way, so that's the process that you'd be following.