This topic is locked

Google Maps - Follow up

10/21/2008 11:17:59 AM
ASPRunnerPro General questions
L
lennyc11563 author

Hi,
I read in a previous post about how to extract data from database fields and place it in a url. The following code works perfect, (View As, Custom Code)
strValue = "http://maps.google.com/maps?f=q&q="; & rs("latitude") & "," & rs("longitude")
It extracts the latitude and longitude from my database and places it in a url which google accepts and returns to me the location.
MY PROBLEM. This only gives a text of the url. I want to make this a clickable hyperlink. I know I need more code in the above string, I just don't know what it is <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=9917&image=1&table=forumtopics' class='bbc_emoticon' alt=':(' />

J
Jane 10/24/2008

Hi,
try to use this one:

strValue = "<a href=""http://maps.google.com/maps?f=q&q="; & rs("latitude") & "," & rs("longitude") & """>Map</a>"

N
Newbe 2/10/2009

hi, how to use iframe or custom view? so that the field will show the actual map???
I've tried the options listed above but it only gives a clickable link, which is somewhat ok, but i would like to display the actual google map.
how to do it,please?? <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=37670&image=1&table=forumreplies' class='bbc_emoticon' alt=':blink:' />
I need the google map link in list view to be a hyperlink, which is fine, but View should be a an actual map.
please help.

J
Jane 2/13/2009

Hi,
you need to create URL with all parameters and use <img> instead of <a>:

strValue = "<img src=""http://maps.google.com/maps?f=q&q="; & rs("latitude") & "," & rs("longitude") & """>"



More info here:

http://code.google.com/apis/maps/documentation/staticmaps/