Skip to content

Instantly share code, notes, and snippets.

@kjellski
Created May 5, 2012 23:08
Show Gist options
  • Select an option

  • Save kjellski/2606224 to your computer and use it in GitHub Desktop.

Select an option

Save kjellski/2606224 to your computer and use it in GitHub Desktop.
backbone.js and gmaps4rails
class Raffler.Views.MapMarkersIndex extends Backbone.View
template: JST['map_markers/index']
render: (markers) ->
console.log "Raffler.Views.MapMarkersIndex render"
$(@el).html(@template())
@loadGoogleMaps(markers)
this
loadGoogleMaps: (markers) ->
console.log "loading GlobalMaps"
map = new Gmaps4RailsGoogle() #new Gmaps4RailsGoogle()
# --> what needs to go here?
# map.initialize()
# map.loadMaps()
# ^- not working...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment