Hello,
I am trying to add a link into the pop-up text bubble of a marker in Google Maps through the API. I have successfully run the below code:
echo '<marker lat="43.91892" lng="-78.89231" html="Albertus Magnus College<br>Link to Admissions" label="Albertus Magnus College" />';
But once I actually try to add the link it fails. Like this:
echo '<marker lat="43.91892" lng="-78.89231" html="Albertus Magnus College<br><a href='http://www.albertus.edu/admission/index.shtml'&gt;Admissions&lt;\/a&gt;" label="Albertus Magnus College" />';
Does anyone know how to successfully write this code? I am writing it into PHP because I have some other functionality that won't let me just write it in XML.
Update: I got it to work like this for some reason...
$window2a_url = '<a href='http://www.albertus.edu/admission/index.shtml&apos;&gt;Admissions';
echo '<marker lat="41.331304" lng="-72.921438" html=" Albertus Magnus College<br>';
echo $window2a_url;
echo '" label="Albertus Magnus College" />';
I had to escape the apostrophes... If anyone has a more elegant solution, I am all ears!