0
votes

Does anyone know how to show google maps using lightbox2 by Lokesh Dhakar (http://lokeshdhakar.com/projects/lightbox2/) I can see lots of examples of showing images, but none on showing maps. I was using lightbox, but it is problematic with later versions of jquery.

This is how to show an image

<a class="example-image-link" href="img/demopage/image-1.jpg" data-lightbox="example-1">
    <img class="example-image" src="img/demopage/thumb-1.jpg" alt="thumb-1" width="150" height="150"/>
</a>

I tried doing something like this, but it doesn't seem to work:

<a href="https://maps.google.co.za/maps?q=S29.103,+E30.104&hl=en&sll=29.103,-30.104&sspn=0.00824,0.016512&t=h&z=12" data-lightbox="map" >
    location
</a>
1
Lightbox2 is for images only. - Pekka
Can you recommend anything for google maps - lightbox style. The project is jquery/knockout/boostrap, so any library that works in that set of frameworks would be helpful - Peter Munnings
It's been too long that I used one so I can't recommend a specific product, but a query for jquery lightbox iframe turns up the most popular products - colorbox, fancybox, easybox and several others. They come with slightly differing feature sets, check out which one works for you - Pekka

1 Answers

0
votes

Straight answer

Lightbox2 does not support anything other than images.

Alternative

Heres an example of how to roll your own lightbox for Google Maps using some simple css and jQuery.

Basically the only real challenge is to resize the canvas on the first show of the overlay.

Other lightbox alternatives