Infowindow with lightbox link PDF Print E-mail
Written by Mike Reumer   
Saturday, 17 March 2012 00:00

It's possible to place a link inside of the infowindow of a marker on the map and open it in a lightbox:

<a href='javascript:void();' onclick='javascript:MOOdalBox.open(\"http://www.joomla.org\", \"Map\", \"600px 600px\", null);return false;' title=link Title>link</a><br />Example

Replace <url> with your link. If you need a space in the linkTitle use "& nbsp;"

{mosmap text='<a href='javascript:void();' onclick='javascript:MOOdalBox.open(\"http://www.joomla.org\", \"Map\", \"600px 600px\", null);return false;' title=link Title>link</a><br />Goto Joomla'}

If you place a link inside the infowindow then it will always open in a new window or tab with Google kml renderer!
You can use a kml-file and GeoXML to open a link in the same window (see kml sidebar).

 

It's also possible in a kml file with GeoXML renderer (Google kml renderer removes javascript). Add to the description of a Placemark:

<description><![CDATA[<a href='javascript:void();' onclick='javascript:MOOdalBox.open("www.joomla.org", "Map", "600px 600px", null);return false;' title=link Title>Lightbox link</a><br />Example]]></description>

{mosmap kml='http://tech.reumer.net/images/lightbox.kml'|kmlrenderer='geoxml'|kmllightbox='1'}

Last Updated on Monday, 06 May 2013 20:27
 

Advertisement