Infowindow with lightbox link PDF Print E-mail
Written by Mike Reumer   
Saturday, 21 March 2009 02:00

It's possible to place a link inside of the infowindow of a marker on the map and open it in a lightbox (version => 2.12h):

<a href='javascript:void();'  onclick='javascript:MOOdalBox.open(\"http://www.google.nl\", \"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.google.nl\", \"Map\", \"600px 600px\", null);return false;' title=link Title>link</a><br />Goto Google'}

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("http://www.google.nl", "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 Saturday, 26 September 2009 16:20
 

Advertisement