Skip to content

Commit

Permalink
Configurable zoom
Browse files Browse the repository at this point in the history
  • Loading branch information
mpowaga committed Dec 7, 2014
1 parent cdabe05 commit b7afe0d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,6 @@ Coordinates will be saved as string in format `latititude,longitude`.
*defaultLat* default latitude
*defaultLng* default longitude

*geolocation* enables or disables geolocation feature. Defaults to `false`
*geolocation* enables or disables geolocation feature. Defaults to `false`

*zoom* zoom of the map. Defaults to `13`
5 changes: 3 additions & 2 deletions lib/client/autoform-map.coffee
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
defaults =
mapType: 'roadmap',
mapType: 'roadmap'
defaultLat: -34.397
defaultLng: 150.644
geolocation: false
zoom: 13

AutoForm.addInputType 'map',
template: 'afMap'
Expand All @@ -27,7 +28,7 @@ Template.afMap.rendered = ->

GoogleMaps.init {}, () =>
mapOptions =
zoom: 13
zoom: @data.options.zoom
mapTypeId: google.maps.MapTypeId[@data.options.mapType]
streetViewControl: false

Expand Down

0 comments on commit b7afe0d

Please sign in to comment.