Created
August 10, 2012 15:01
-
-
Save yortz/3314799 to your computer and use it in GitHub Desktop.
StoreLocator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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