Skip to content

Instantly share code, notes, and snippets.

@yortz
Created August 10, 2012 15:01
Show Gist options
  • Save yortz/3314799 to your computer and use it in GitHub Desktop.
Save yortz/3314799 to your computer and use it in GitHub Desktop.
StoreLocator
class mm.StoreLocator extends mm.Module
constructor: ->
@canvas = $('#map-canvas')
@center = new google.maps.LatLng(51.512054, -0.103855)
@mapOpts =
zoom: 11
zoomControl: true #seems that 320-up is breaking zoomcontrol???? though it seems from the mockups that they just want an empy map
disableDefaultUI: true
mapTypeId: google.maps.MapTypeId.ROADMAP
center: @center
@canBeLoaded: -> $('#map-canvas').length > 0
init: ->
console.log("init")
@buildMap()
buildMap: (canvas, opts) ->
console.log("building map")
new google.maps.Map @canvas[0], @mapOpts
mm.ModuleLoader.registerModule mm.StoreLocator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment