Calling Fancybox from Event Listener in Google Maps Instead of Default Infowindow -


i'm looking replace default google maps api infowindow fancybox overlay.

version

google maps api 3.0

goal

replace default infowindow fancybox popup

use case

  1. google map loaded in full screen (100% 100%)
  2. markers placed onto map
  3. user clicks on marker , shown fancybox popup overlays map
  4. user clicks on "x" in top right hand corner of fancybox close it

i'm @ loss how best tackle this. easiest call fancybox using addlistener event handler, passing in marker parameter? if so, how of recommend doing this?

for example:

google.maps.event.addlistener(marker, 'click', function(){     // call fancybox, how? }); 

thank in advance,

graham kennedy

i've found best way go pass in content manually fancybox's href method. works charm me.

function addmarker(data) {      // build window contents     var contentforbox = data;      google.maps.event.addlistener(marker, 'click', function() {          $.fancybox({             href: contentforbox             // other options         });       }); } 

Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

sql server - python to mssql encoding problem -

windows - Python Service Installation - "Could not find PythonClass entry" -