user961300
user961300

Reputation: 71

Google Maps - How to make the marker a link that opens in a lightbox

I have created a google maps page with custom markers and locations. I want the user to be able to click on the marker of a location and it opens a lightbox on that page. Is this possible? Thanks!

Upvotes: 2

Views: 1797

Answers (1)

Chazbot
Chazbot

Reputation: 1890

You'll want to check out this documentation page, on Google Maps event handling:

http://code.google.com/apis/maps/documentation/javascript/events.html#EventListeners

...and from that page...

google.maps.event.addListener(marker, 'click', function() {
    map.setZoom(8);
});

Note that this simply calls a map function (setZoom); it's up to you to launch any custom lightbox you might want, assuming you don't want to use a GoogleMaps-style popup of some kind.

Upvotes: 2

Related Questions