How to display Google directions onto my site

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
amir
Forum Contributor
Posts: 287
Joined: Sat Oct 07, 2006 4:28 pm

How to display Google directions onto my site

Post by amir »

Hello,
I am working on a hotel project and I have to display hotel map as well as directions e.g. if we take the example of hotel carling view then the directions are

From Downtown:
Take Gardiner Expressway West, exit 427 North, exit at Dixon Road turning right onto Dixon Road, turn right at Carlingview Drive, hotel is on your left.

I a able to display hotel map using google map API but I am really looking for Google Directions.

Please advise.
TIA.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Unless the Google API allows to you pull directions, just redirect the user to the Google maps page(s).
amir
Forum Contributor
Posts: 287
Joined: Sat Oct 07, 2006 4:28 pm

Post by amir »

feyd! thanks a lot for your quick response
Unless the Google API allows to you pull directions
,
Do I have to take special permissions from Google? please explain.
just redirect the user to the Google maps page(s).
please explain this also

I am novice in Google API world. please let me understand this just like a php baby.

A great many thanls.
User avatar
aaronhall
DevNet Resident
Posts: 1040
Joined: Tue Aug 13, 2002 5:10 pm
Location: Back in Phoenix, missing the microbrews
Contact:

Post by aaronhall »

amir
Forum Contributor
Posts: 287
Joined: Sat Oct 07, 2006 4:28 pm

Post by amir »

True but I have been looking for Directions not for Map.
Thanks.
User avatar
aaronhall
DevNet Resident
Posts: 1040
Joined: Tue Aug 13, 2002 5:10 pm
Location: Back in Phoenix, missing the microbrews
Contact:

Post by aaronhall »

MapQuest has a routing API
amir
Forum Contributor
Posts: 287
Joined: Sat Oct 07, 2006 4:28 pm

Post by amir »

Thanks for your time and support. I 'll try it.
=)
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

google doesn't have an api for routing directions yet, or at least they didn't last time I checked. You have to use a third party to do so. Also, Google maps is not php, it's javascript. This is reference to this comment:
I am novice in Google API world. please let me understand this just like a php baby.
that should be:
I am novice in Google API world. please let me understand this just like a javascript baby.
amir
Forum Contributor
Posts: 287
Joined: Sat Oct 07, 2006 4:28 pm

Post by amir »

I admit I am a PHP baby but not as baby as you take me. I think you have not explored Google Maps yet because most of the code is in PHP. E.g.
-> GoogleMapAPI.class.php
:D
User avatar
aaronhall
DevNet Resident
Posts: 1040
Joined: Tue Aug 13, 2002 5:10 pm
Location: Back in Phoenix, missing the microbrews
Contact:

Post by aaronhall »

That's not published by Google. It makes use of Google's javascript API
amir
Forum Contributor
Posts: 287
Joined: Sat Oct 07, 2006 4:28 pm

Post by amir »

Hey! I got it man.
Thanks.
Post Reply