Google Answers Logo
View Question
 
Q: G-map API - directions to location on web site ( No Answer,   0 Comments )
Question  
Subject: G-map API - directions to location on web site
Category: Computers > Internet
Asked by: cynthia-ga
List Price: $25.00
Posted: 07 Apr 2006 21:49 PDT
Expires: 07 May 2006 21:49 PDT
Question ID: 716677
Hi Researchers!

Please bear with me. My brother is redesigning his web site. He sells
Real Estate. I want the developer to add a way for the web site
visitors to enter an address, and a G**gle Map will launch wherein
directions from the location they entered to one of three "new home
developments" will automatically be generated from the location they
entered to the new home development destination.. Starting from a zip
code is ok.

I am good at searching, in fact, I am a GAR using this handle so my
brother's credit card will be charged instead of mine, I work for him.
Frankly, I have had no luck finding the perfect application, but I
have come very close.

Here's the problem. The G**gle Maps API
://www.google.com/apis/maps/ kind of generates the type of map I
want. It's too small, but I want it embedded on my brothers web page. 
The G API has no code for the people to enter a starting point to get
directions, plus the developer does not have the G**gle API Key.

I found this:

Add G**gle Maps Directions to your site...
http://www.malevolent.com/weblog/archive/2005/05/01/add-google-maps/

This is the example of Matt's code, Amarillo is the predetermined
destination, it's excellent --except I want to stay on my brother's
web page, not send them off the site to maps.g**gle.com I also want it
printable:
http://maps.google.com/maps?saddr=98125&daddr=Amarillo%2C+TX&hl=en
This is perfect, but does not embed in my brother's web page.


Please ask for clarification and develop a conversation so I can be
assured of getting the answer I need, and you can be assured of
getting a handsome tip.


Thank you for your assistance,
~~Cynthia-ga

Clarification of Question by cynthia-ga on 07 Apr 2006 21:53 PDT
Geez, not sure how this ended up under my name, I was logged in to my
brother's GA account, or I thought!

Clarification of Question by cynthia-ga on 07 Apr 2006 22:05 PDT
I also want to clarify, the G-Map API example, the map is embedded and
moves, this is not necessary, but the map and directions must appear
on my brothers page not redirected/open new window to the g-map site.

Also, I would like the map to be bigger, or an option for a bigger
view for printing.

The map must open at a resolution which shows both the starting and
ending points as close as possible, street names must show.

I found one other option about a week ago, it was similar to Matt's
code but had several layers that could be added, that might work but
if I remember correctly, it was missing the ability to add/fix a
destination. I'll look for it again, maybe it can be modified.

Request for Question Clarification by sublime1-ga on 07 Apr 2006 22:09 PDT
cynthia...

Is it just that the developer needs an API key? Will showing
you where he can obtain one help?

Clarification of Question by cynthia-ga on 07 Apr 2006 22:13 PDT
No, but that would certainly help! I told him I would handle getting
the mapping thing figured out. I thought I could just search for it,
but it's not that easy.

Will he need the key?   <----- blond moment.

Request for Question Clarification by sublime1-ga on 07 Apr 2006 22:35 PDT
Honestly, I'm not positive. If your developer creates original code
that then draws from Google using the API, he needs a license. The
homepage for Google API is here:
://www.google.com/apis/

FAQs are here:
://www.google.com/apis/api_faq.html

To get an license, you (he) first need(s) a Google Account.
Then sign in and go to:
http://api.google.com/createkey

If, rather than developing an application, you only want to use
properly attributed code from a Google site like Maps, I'm not
sure if you need the API license or not, but it would seem like
you might, because the license allows for so many (1000) queries
per day from Google's databanks via the interface. I'm not sure
about the legality of simply embedding Google Maps code in your
website.

I think I'm turning blonde...  ; )

Maybe between the two of us, we can figure this out...

sublime1-ga

Request for Question Clarification by sublime1-ga on 07 Apr 2006 22:39 PDT
Duh...I guess this page makes it clear that you need an API key to
embed Google Maps in your site:
://www.google.com/apis/maps/

and this page looks helpful:
://www.google.com/apis/maps/documentation/

Request for Question Clarification by sublime1-ga on 07 Apr 2006 22:51 PDT
Yeah...

On that last link I gave, scroll down to the Introduction section,
where it says, 'The "Hello, World" of Google Maps'.

That shows code for a 500x300 map centered on Palo Alto, California.

You'd just need to modify the size to your liking and then get the
coordinates for Amarillo, at the level of magnification you want.
Just use Google maps to navigate to what you want and copy the 
coordinates from the source code into the code above, along with
your (his) personal API key. Since it's your brother's site, I
don't know if the key needs to be in his name, or if the developer's
key will be satisfactory. I would think the latter would be okay,
but a developer may not want to lend a key limited to 1000 queries
to a website that uses a lot of that up...ya know?

I'd say have your brother apply for his own API key for use with 
this feature.

I think this might be an answer...let me know what you think...

sublime1-ga

Clarification of Question by cynthia-ga on 07 Apr 2006 22:55 PDT
I don't want him to write the code, I want to give it to him. 

I know what I want in the end, and have no plan as to how to do it,
except that I know the current mapping links above are close to what I
want, but not perfect. I'm hoping something is already out there so we
don't have to compromise and send them off site.

After I find the right code, I still have no idea what he needs to do.
I guess that's part of the question, and would increase the tip.

I have given the developer a link to this question, maybe he'll
register and participate.

This is an important function of the web site and will free up a lot
of my brother's time, and make it very easy for potential buyers and
their agents to get to the new home sites.

Because they are new developments, when you enter an address into
Google Maps, the streets are SO NEW, that they won't map correctly.
That's why I want to manually have the destination fixed to the
nearest cross-streets that WILL map...

Clarification of Question by cynthia-ga on 07 Apr 2006 22:57 PDT
I got a key thanks to your link... I have no other use for it so that
will work.  Still reading your last post...

Request for Question Clarification by sublime1-ga on 07 Apr 2006 22:59 PDT
*Sigh*

For that handsome tip, I suppose you'll want me to get you those
coordinates, too...

Request for Question Clarification by sublime1-ga on 07 Apr 2006 23:08 PDT
You said:

"After I find the right code, I still have no idea what he needs to do.
 I guess that's part of the question, and would increase the tip."

Again:

On that last link I gave, scroll down to the Introduction section,
where it says, 'The "Hello, World" of Google Maps'.

That shows code for a 500x300 map centered on Palo Alto, California.

You'd just need to modify the code to a size of your preference
[say 700 x 500] and then get the coordinates for Amarillo, at the
level of magnification you want. You can do that by using the real
Google maps to navigate to the location you want and then copy the 
coordinates from the source code of that page (and, I think, the
actual page) into the code above, along with the API key.

As it stands, that code will produce a navigable, movable map, but
as long as it's centered where you want to start with, I don't see
any disadvantages to that.

Request for Question Clarification by sublime1-ga on 07 Apr 2006 23:26 PDT
Um...I just now looked at the link you gave as preferred:
http://maps.google.com/maps?saddr=98125&daddr=Amarillo%2C+TX&hl=en

It's not based on map coordinates, and includes directions and
a route on the map. You can't really create that starting with
the code on the page I cited, you'd have to copy the appropriate
part of the source code from link above and insert it into the
right place in the "Hello World" script. I'm not a developer,
so that would be a challenge for me, but should be a piece of
cake for your developer. He just needs the API.

Request for Question Clarification by sublime1-ga on 07 Apr 2006 23:26 PDT
He just needs the API key, I meant.

Clarification of Question by cynthia-ga on 08 Apr 2006 00:10 PDT
Bummer. Let me think on it till tomorrow.
Answer  
There is no answer at this time.

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy