volt-google-maps 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/app/google-maps/controllers/main_controller.rb +9 -10
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c9f78952483f92ca156f418d78928c02303bb8b0
|
4
|
+
data.tar.gz: 9c1aef30308da2e69b54a25413d389efa0934c0a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4cfef6b11a798ce0201c1555b8fe6f7556ed1731bcf10d96bc43e648fd6ab8554dba987aab516936b00e97c31f3a725d63deb013840631b61fd6f10df920e2b7
|
7
|
+
data.tar.gz: 1beca4147362ad923ebb603ca2da4c7036b8559d70cdaa999603edad7f54a57047fb4c949a8598d7a74f718a1573743a7f4767620c47a788b30605f0d1fe24c9
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.7
|
@@ -20,15 +20,6 @@ module GoogleMaps
|
|
20
20
|
else
|
21
21
|
setup_map(node, {lat: -34.397, lng: 150.644}.to_n)
|
22
22
|
end
|
23
|
-
|
24
|
-
if attrs.respond_to?(:zoom)
|
25
|
-
set_zoom
|
26
|
-
end
|
27
|
-
|
28
|
-
if attrs.respond_to?(:markers)
|
29
|
-
set_markers
|
30
|
-
end
|
31
|
-
|
32
23
|
end
|
33
24
|
|
34
25
|
|
@@ -77,6 +68,7 @@ module GoogleMaps
|
|
77
68
|
end
|
78
69
|
|
79
70
|
def setup_zoom
|
71
|
+
puts "SETUP ZOOM"
|
80
72
|
`google.maps.event.addListener(self.map, 'zoom_changed', function() {
|
81
73
|
var zoomLevel = self.map.getZoom();`
|
82
74
|
|
@@ -98,6 +90,7 @@ module GoogleMaps
|
|
98
90
|
def set_zoom
|
99
91
|
-> do
|
100
92
|
attrs.zoom
|
93
|
+
puts "SET ZOOM"
|
101
94
|
unless @changing_zoom
|
102
95
|
level = attrs.zoom
|
103
96
|
if level.blank?
|
@@ -121,6 +114,7 @@ module GoogleMaps
|
|
121
114
|
zoom: 8
|
122
115
|
};
|
123
116
|
this.map = new google.maps.Map($(node).find('.google-map-instance').get(0), mapOptions);
|
117
|
+
console.log('map setup');
|
124
118
|
}
|
125
119
|
|
126
120
|
if attrs.respond_to?(:center)
|
@@ -128,7 +122,12 @@ module GoogleMaps
|
|
128
122
|
-> { set_center(attrs.center) }.watch!
|
129
123
|
end
|
130
124
|
|
131
|
-
|
125
|
+
|
126
|
+
set_zoom if attrs.respond_to?(:zoom)
|
127
|
+
|
128
|
+
set_markers if attrs.respond_to?(:markers)
|
129
|
+
|
130
|
+
setup_zoom if attrs.respond_to?(:zoom=)
|
132
131
|
end
|
133
132
|
|
134
133
|
def set_center(address)
|