The second link provides the information that I need!!!

 

http://maps.googleapis.com/maps/api/distancematrix/xml?origins=90254
<http://maps.googleapis.com/maps/api/distancematrix/xml?origins=90254&destin
ations=92656&sensor=false> &destinations=92656&sensor=false

gives me these results:

<DistanceMatrixResponse>

<status>OK</status>

<origin_address>Hermosa Beach, CA 90254, USA</origin_address>

<destination_address>Aliso Viejo, CA 92656, USA</destination_address>

<row>

<element><status>OK</status>

<duration><value>3861</value>

<text>1 hour 4 mins</text></duration>

<distance><value>78138</value>

<text>78.1 km</text></distance></element>

</row>

</DistanceMatrixResponse>

 

I will use the <distance><value>78138</value><text>78.1 km</text></distance>
information for my display query, to ensure just the people within the
desired dating range show on the page.

 

- - - 

How can I grab just the City name and State from each variable provided?

Do I use an array command to break the origin down using comma separation
(I'm using php)?

 

What I want is to just display the City and State as a hyperlink on the
page.. When clicked it will bring the map up to show distance.

 

<origin_address>Hermosa Beach, CA 90254, USA</origin_address>

<destination_address>Aliso Viejo, CA 92656, USA</destination_address>

 

Am I on the right track?

 

Thank you 

 

Steve

  _____  

From: [email protected]
[mailto:[email protected]] On Behalf Of Ranjeet Kumar Raya
Sent: Saturday, February 25, 2012 6:11 PM
To: [email protected]
Subject: Re: [Google Maps API v2] Newb needs help - Is this possible?

 

Hi,

 

I hope this might help you.

http://stackoverflow.com/questions/8965418/google-maps-get-state-name-by-cit
y-or-zip-input

http://stackoverflow.com/questions/8519184/how-to-get-distance-by-city-zipco
de-on-google-maps-api

 

 

On Sat, Feb 25, 2012 at 1:31 AM, steve <[email protected]> wrote:

I would greatly appreciate direction on my need

- I have a dating site that gathers zip codes.
- I want to feed zip codes (from two users) into google map and be
able to retrieve the related city name from the zip code and display
the city name on the profile pages as a link (that when clicked pulls
up the google map showing the approximate distance each user is from
the other)

1) Is it possible?
2) Can you direct me to the best place to get some code I can modify?
3) Thank you very much!

Steve

--
You received this message because you are subscribed to the Google Groups
"Google Maps API V2" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected]
<mailto:google-maps-api%[email protected]> .
For more options, visit this group at
http://groups.google.com/group/google-maps-api?hl=en.





 

-- 
Best Regards,
Ranjeet

-- 
You received this message because you are subscribed to the Google Groups
"Google Maps API V2" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-maps-api?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps API V2" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-api?hl=en.

Reply via email to