Skip to content

Instantly share code, notes, and snippets.

@jlstr
Created February 10, 2012 20:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jlstr/1792561 to your computer and use it in GitHub Desktop.
Save jlstr/1792561 to your computer and use it in GitHub Desktop.
After opening FancyBox
$ ->
new FancyMap()
class FancyMap
constructor: ->
@openMap @afterOpened
openMap: (callback)->
$('a[href=#fancybox-container]').fancybox
maxWidth: 500
maxHeight: 550
fitToView: true
autoSize: true
closeClick: false
openEffect: 'none'
closeEffect: 'none'
onComplete: callback()
afterOpened: ->
options =
center: new google.maps.LatLng(6.191556, -75.579716)
zoom: 14
mapTypeId: google.maps.MapTypeId.ROADMAP
@map = new google.maps.Map $('#fancybox-container')[0], options
window.FancyMap = FancyMap
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment