Skip to content

Instantly share code, notes, and snippets.

@LarryEitel
Created July 9, 2012 00:43
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 LarryEitel/3073583 to your computer and use it in GitHub Desktop.
Save LarryEitel/3073583 to your computer and use it in GitHub Desktop.
AngularJS factory
module.factory "GoogleMap", ($rootScope, $location, $compile) ->
ROOTSCOPE = $rootScope
COMPILE = $compile
SJO = {lat: 9.993552791991132, lng: -84.20888416469096}
initPosition = SJO
initZoom = 16
mapOptions =
compile: $compile
rootScope: $rootScope
location: $location
zoom: initZoom
mapType: 'm'
center:
lat: initPosition.lat
lng: initPosition.lng
return new GMap(mapOptions)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment