Forums: How to link to Google Maps from records in Database - Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

How to link to Google Maps from records in Database creating address links that link to Google maps Rate Topic: -----

#1 User is offline   runnerPHP_2007 

  • Member
  • PipPip
  • Group: Members
  • Posts: 22
  • Joined: 17-January 07

Posted 26 September 2007 - 06:38 AM

I have users enter addresses into a MYSQL database.
When other people view these addresses in the "list View" I want to create a link that dynamically pulls up a Google Map based on that record.

Any ideas?

I am collecting, Street_address, City, State, Zip
0

#2 User is offline   Jane 

  • Advanced Member
  • PipPipPip
  • Group: Admin
  • Posts: 7278
  • Joined: 13-June 06
  • Gender:Female

Posted 26 September 2007 - 10:05 AM

Hi,

you can do it using Custom format on the "View as" settings dialog on the Visual Editor tab.
Here is a sample code:

Quote

global $data;
$value = "<a target=_blank href=\"http://maps.google.com/?ie=UTF8&hl=en&q=".$data["Street_address"]." ".$data["City"]." ".$data["State"]." ".$data["Zip"]."\">google map</a>";

best regards,
Jane Endaltseva
e-mail: support@xlinesoft.com
0

#3 User is offline   runnerPHP_2007 

  • Member
  • PipPip
  • Group: Members
  • Posts: 22
  • Joined: 17-January 07

Posted 29 September 2007 - 05:34 AM

Ok, and what if I wanted to make a anything entered into a particular field, like "Store_Name" become a clickable link in the listview that goes to that records website address. Website address is collected in a field called "website_address"

Thank You!

View PostJane, on Sep 26 2007, 05:05 AM, said:

Hi,

you can do it using Custom format on the "View as" settings dialog on the Visual Editor tab.
Here is a sample code:

Quote

global $data;
$value = "<a target=_blank href=\"http://maps.google.com/?ie=UTF8&hl=en&q=".$data["Street_address"]." ".$data["City"]." ".$data["State"]." ".$data["Zip"]."\">google map</a>";

0

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users