gmapsjs-rails 0.2.30.1 → 0.4.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +8 -1
- data/app/assets/javascripts/gmaps.js +41 -27
- data/app/assets/javascripts/{gmaps.controls.js → gmaps/controls.js} +6 -3
- data/app/assets/javascripts/{gmaps.core.js → gmaps/core.js} +1 -1
- data/app/assets/javascripts/{gmaps.events.js → gmaps/events.js} +0 -0
- data/app/assets/javascripts/{gmaps.geofences.js → gmaps/geofences.js} +0 -0
- data/app/assets/javascripts/{gmaps.geometry.js → gmaps/geometry.js} +0 -0
- data/app/assets/javascripts/{gmaps.layers.js → gmaps/layers.js} +6 -2
- data/app/assets/javascripts/{gmaps.map_types.js → gmaps/map_types.js} +0 -0
- data/app/assets/javascripts/{gmaps.markers.js → gmaps/markers.js} +21 -17
- data/app/assets/javascripts/{gmaps.native_extensions.js → gmaps/native_extensions.js} +0 -0
- data/app/assets/javascripts/{gmaps.overlays.js → gmaps/overlays.js} +0 -0
- data/app/assets/javascripts/{gmaps.routes.js → gmaps/routes.js} +0 -0
- data/app/assets/javascripts/{gmaps.static.js → gmaps/static.js} +0 -0
- data/app/assets/javascripts/{gmaps.streetview.js → gmaps/streetview.js} +0 -0
- data/app/assets/javascripts/{gmaps.styles.js → gmaps/styles.js} +0 -0
- data/app/assets/javascripts/{gmaps.utils.js → gmaps/utils.js} +0 -0
- data/lib/gmapsjs-rails/version.rb +1 -1
- metadata +19 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eed170925fa488d359eab5983f20eba4a6ff2861
|
4
|
+
data.tar.gz: 14ebe8ca74f7e192bcf4f501718b662adf24ffdd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 160745b7de03f6834bc81d488bfdbef58652c451bff43dfea8fc5d7a381b1601fb80cbea42b839472730866d730f79333328f76b2b4837d582cb2f5254607273
|
7
|
+
data.tar.gz: e40117b87980ba3ad18c87aa35240b9abd853c3feb7cd44746d0aa999a42afb47f5605c6351c3486790cfb7b45972425bfb998e72da29c1783c05c288f010b10
|
data/README.md
CHANGED
@@ -21,8 +21,15 @@ Or install it yourself as:
|
|
21
21
|
|
22
22
|
## Usage
|
23
23
|
|
24
|
-
|
24
|
+
If you want to include all GmapsJS functionality to your manifest file, add the following line to your manifest:
|
25
25
|
|
26
26
|
//= require gmaps
|
27
27
|
|
28
|
+
|
29
|
+
To select the functionality you want to include, you can instead add lines such as
|
30
|
+
|
31
|
+
//= require gmaps/core
|
32
|
+
//= require gmaps/controls
|
33
|
+
//= .....
|
34
|
+
|
28
35
|
Read the documentation and examples at: http://hpneo.github.com/gmaps/
|
@@ -11,10 +11,10 @@
|
|
11
11
|
}(this, function() {
|
12
12
|
|
13
13
|
/*!
|
14
|
-
* GMaps.js v0.4.
|
14
|
+
* GMaps.js v0.4.11
|
15
15
|
* http://hpneo.github.com/gmaps/
|
16
16
|
*
|
17
|
-
* Copyright
|
17
|
+
* Copyright 2014, Gustavo Leon
|
18
18
|
* Released under the MIT License.
|
19
19
|
*/
|
20
20
|
|
@@ -267,7 +267,7 @@ var GMaps = (function(global) {
|
|
267
267
|
context_menu_element.innerHTML = html;
|
268
268
|
|
269
269
|
var context_menu_items = context_menu_element.getElementsByTagName('a'),
|
270
|
-
context_menu_items_count = context_menu_items.length
|
270
|
+
context_menu_items_count = context_menu_items.length,
|
271
271
|
i;
|
272
272
|
|
273
273
|
for (i = 0; i < context_menu_items_count; i++) {
|
@@ -480,9 +480,12 @@ GMaps.prototype.createControl = function(options) {
|
|
480
480
|
var control = document.createElement('div');
|
481
481
|
|
482
482
|
control.style.cursor = 'pointer';
|
483
|
-
|
484
|
-
|
485
|
-
|
483
|
+
|
484
|
+
if (options.disableDefaultStyles !== true) {
|
485
|
+
control.style.fontFamily = 'Roboto, Arial, sans-serif';
|
486
|
+
control.style.fontSize = '11px';
|
487
|
+
control.style.boxShadow = 'rgba(0, 0, 0, 0.298039) 0px 1px 4px -1px';
|
488
|
+
}
|
486
489
|
|
487
490
|
for (var option in options.style) {
|
488
491
|
control.style[option] = options.style[option];
|
@@ -538,15 +541,15 @@ GMaps.prototype.createMarker = function(options) {
|
|
538
541
|
base_options = {
|
539
542
|
position: new google.maps.LatLng(options.lat, options.lng),
|
540
543
|
map: null
|
541
|
-
}
|
544
|
+
},
|
545
|
+
marker_options = extend_object(base_options, options);
|
542
546
|
|
543
|
-
delete
|
544
|
-
delete
|
545
|
-
delete
|
546
|
-
delete
|
547
|
+
delete marker_options.lat;
|
548
|
+
delete marker_options.lng;
|
549
|
+
delete marker_options.fences;
|
550
|
+
delete marker_options.outside;
|
547
551
|
|
548
|
-
var
|
549
|
-
marker = new google.maps.Marker(marker_options);
|
552
|
+
var marker = new google.maps.Marker(marker_options);
|
550
553
|
|
551
554
|
marker.fences = fences;
|
552
555
|
|
@@ -668,7 +671,7 @@ GMaps.prototype.addMarkers = function(array) {
|
|
668
671
|
|
669
672
|
GMaps.prototype.hideInfoWindows = function() {
|
670
673
|
for (var i = 0, marker; marker = this.markers[i]; i++){
|
671
|
-
if (marker.infoWindow){
|
674
|
+
if (marker.infoWindow) {
|
672
675
|
marker.infoWindow.close();
|
673
676
|
}
|
674
677
|
}
|
@@ -693,24 +696,31 @@ GMaps.prototype.removeMarker = function(marker) {
|
|
693
696
|
return marker;
|
694
697
|
};
|
695
698
|
|
696
|
-
GMaps.prototype.removeMarkers = function(collection) {
|
697
|
-
var
|
699
|
+
GMaps.prototype.removeMarkers = function (collection) {
|
700
|
+
var new_markers = [];
|
698
701
|
|
699
|
-
|
700
|
-
|
702
|
+
if (typeof collection == 'undefined') {
|
703
|
+
for (var i = 0; i < this.markers.length; i++) {
|
701
704
|
this.markers[i].setMap(null);
|
702
705
|
}
|
706
|
+
|
707
|
+
this.markers = new_markers;
|
703
708
|
}
|
709
|
+
else {
|
710
|
+
for (var i = 0; i < collection.length; i++) {
|
711
|
+
if (this.markers.indexOf(collection[i]) > -1) {
|
712
|
+
this.markers[i].setMap(null);
|
713
|
+
}
|
714
|
+
}
|
704
715
|
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
new_markers.push(this.markers[i]);
|
716
|
+
for (var i = 0; i < this.markers.length; i++) {
|
717
|
+
if (this.markers[i].getMap() != null) {
|
718
|
+
new_markers.push(this.markers[i]);
|
719
|
+
}
|
710
720
|
}
|
711
|
-
}
|
712
721
|
|
713
|
-
|
722
|
+
this.markers = new_markers;
|
723
|
+
}
|
714
724
|
};
|
715
725
|
|
716
726
|
GMaps.prototype.drawOverlay = function(options) {
|
@@ -1137,8 +1147,8 @@ GMaps.prototype.addLayer = function(layerName, options) {
|
|
1137
1147
|
case 'places':
|
1138
1148
|
this.singleLayers.places = layer = new google.maps.places.PlacesService(this.map);
|
1139
1149
|
|
1140
|
-
//search
|
1141
|
-
if (options.search || options.nearbySearch) {
|
1150
|
+
//search, nearbySearch, radarSearch callback, Both are the same
|
1151
|
+
if (options.search || options.nearbySearch || options.radarSearch) {
|
1142
1152
|
var placeSearchRequest = {
|
1143
1153
|
bounds : options.bounds || null,
|
1144
1154
|
keyword : options.keyword || null,
|
@@ -1149,6 +1159,10 @@ GMaps.prototype.addLayer = function(layerName, options) {
|
|
1149
1159
|
types : options.types || null
|
1150
1160
|
};
|
1151
1161
|
|
1162
|
+
if (options.radarSearch) {
|
1163
|
+
layer.radarSearch(placeSearchRequest, options.radarSearch);
|
1164
|
+
}
|
1165
|
+
|
1152
1166
|
if (options.search) {
|
1153
1167
|
layer.search(placeSearchRequest, options.search);
|
1154
1168
|
}
|
@@ -2,9 +2,12 @@ GMaps.prototype.createControl = function(options) {
|
|
2
2
|
var control = document.createElement('div');
|
3
3
|
|
4
4
|
control.style.cursor = 'pointer';
|
5
|
-
|
6
|
-
|
7
|
-
|
5
|
+
|
6
|
+
if (options.disableDefaultStyles !== true) {
|
7
|
+
control.style.fontFamily = 'Roboto, Arial, sans-serif';
|
8
|
+
control.style.fontSize = '11px';
|
9
|
+
control.style.boxShadow = 'rgba(0, 0, 0, 0.298039) 0px 1px 4px -1px';
|
10
|
+
}
|
8
11
|
|
9
12
|
for (var option in options.style) {
|
10
13
|
control.style[option] = options.style[option];
|
@@ -247,7 +247,7 @@ var GMaps = (function(global) {
|
|
247
247
|
context_menu_element.innerHTML = html;
|
248
248
|
|
249
249
|
var context_menu_items = context_menu_element.getElementsByTagName('a'),
|
250
|
-
context_menu_items_count = context_menu_items.length
|
250
|
+
context_menu_items_count = context_menu_items.length,
|
251
251
|
i;
|
252
252
|
|
253
253
|
for (i = 0; i < context_menu_items_count; i++) {
|
File without changes
|
File without changes
|
File without changes
|
@@ -88,8 +88,8 @@ GMaps.prototype.addLayer = function(layerName, options) {
|
|
88
88
|
case 'places':
|
89
89
|
this.singleLayers.places = layer = new google.maps.places.PlacesService(this.map);
|
90
90
|
|
91
|
-
//search
|
92
|
-
if (options.search || options.nearbySearch) {
|
91
|
+
//search, nearbySearch, radarSearch callback, Both are the same
|
92
|
+
if (options.search || options.nearbySearch || options.radarSearch) {
|
93
93
|
var placeSearchRequest = {
|
94
94
|
bounds : options.bounds || null,
|
95
95
|
keyword : options.keyword || null,
|
@@ -100,6 +100,10 @@ GMaps.prototype.addLayer = function(layerName, options) {
|
|
100
100
|
types : options.types || null
|
101
101
|
};
|
102
102
|
|
103
|
+
if (options.radarSearch) {
|
104
|
+
layer.radarSearch(placeSearchRequest, options.radarSearch);
|
105
|
+
}
|
106
|
+
|
103
107
|
if (options.search) {
|
104
108
|
layer.search(placeSearchRequest, options.search);
|
105
109
|
}
|
File without changes
|
@@ -10,15 +10,15 @@ GMaps.prototype.createMarker = function(options) {
|
|
10
10
|
base_options = {
|
11
11
|
position: new google.maps.LatLng(options.lat, options.lng),
|
12
12
|
map: null
|
13
|
-
}
|
13
|
+
},
|
14
|
+
marker_options = extend_object(base_options, options);
|
14
15
|
|
15
|
-
delete
|
16
|
-
delete
|
17
|
-
delete
|
18
|
-
delete
|
16
|
+
delete marker_options.lat;
|
17
|
+
delete marker_options.lng;
|
18
|
+
delete marker_options.fences;
|
19
|
+
delete marker_options.outside;
|
19
20
|
|
20
|
-
var
|
21
|
-
marker = new google.maps.Marker(marker_options);
|
21
|
+
var marker = new google.maps.Marker(marker_options);
|
22
22
|
|
23
23
|
marker.fences = fences;
|
24
24
|
|
@@ -140,7 +140,7 @@ GMaps.prototype.addMarkers = function(array) {
|
|
140
140
|
|
141
141
|
GMaps.prototype.hideInfoWindows = function() {
|
142
142
|
for (var i = 0, marker; marker = this.markers[i]; i++){
|
143
|
-
if (marker.infoWindow){
|
143
|
+
if (marker.infoWindow) {
|
144
144
|
marker.infoWindow.close();
|
145
145
|
}
|
146
146
|
}
|
@@ -166,24 +166,28 @@ GMaps.prototype.removeMarker = function(marker) {
|
|
166
166
|
};
|
167
167
|
|
168
168
|
GMaps.prototype.removeMarkers = function (collection) {
|
169
|
-
|
170
|
-
|
169
|
+
var new_markers = [];
|
170
|
+
|
171
|
+
if (typeof collection == 'undefined') {
|
172
|
+
for (var i = 0; i < this.markers.length; i++) {
|
171
173
|
this.markers[i].setMap(null);
|
172
174
|
}
|
173
|
-
|
175
|
+
|
174
176
|
this.markers = new_markers;
|
175
|
-
}
|
176
|
-
|
177
|
-
|
177
|
+
}
|
178
|
+
else {
|
179
|
+
for (var i = 0; i < collection.length; i++) {
|
180
|
+
if (this.markers.indexOf(collection[i]) > -1) {
|
178
181
|
this.markers[i].setMap(null);
|
179
182
|
}
|
180
183
|
}
|
181
|
-
|
182
|
-
for(var i = 0; i < this.markers.length; i++) {
|
183
|
-
if(this.markers[i].getMap() != null) {
|
184
|
+
|
185
|
+
for (var i = 0; i < this.markers.length; i++) {
|
186
|
+
if (this.markers[i].getMap() != null) {
|
184
187
|
new_markers.push(this.markers[i]);
|
185
188
|
}
|
186
189
|
}
|
190
|
+
|
187
191
|
this.markers = new_markers;
|
188
192
|
}
|
189
193
|
};
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gmapsjs-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pablo Lluch
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-04-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -40,22 +40,22 @@ files:
|
|
40
40
|
- LICENSE
|
41
41
|
- README.md
|
42
42
|
- Rakefile
|
43
|
-
- app/assets/javascripts/gmaps.controls.js
|
44
|
-
- app/assets/javascripts/gmaps.core.js
|
45
|
-
- app/assets/javascripts/gmaps.events.js
|
46
|
-
- app/assets/javascripts/gmaps.geofences.js
|
47
|
-
- app/assets/javascripts/gmaps.geometry.js
|
48
43
|
- app/assets/javascripts/gmaps.js
|
49
|
-
- app/assets/javascripts/gmaps.
|
50
|
-
- app/assets/javascripts/gmaps.
|
51
|
-
- app/assets/javascripts/gmaps.
|
52
|
-
- app/assets/javascripts/gmaps.
|
53
|
-
- app/assets/javascripts/gmaps.
|
54
|
-
- app/assets/javascripts/gmaps.
|
55
|
-
- app/assets/javascripts/gmaps.
|
56
|
-
- app/assets/javascripts/gmaps.
|
57
|
-
- app/assets/javascripts/gmaps.
|
58
|
-
- app/assets/javascripts/gmaps.
|
44
|
+
- app/assets/javascripts/gmaps/controls.js
|
45
|
+
- app/assets/javascripts/gmaps/core.js
|
46
|
+
- app/assets/javascripts/gmaps/events.js
|
47
|
+
- app/assets/javascripts/gmaps/geofences.js
|
48
|
+
- app/assets/javascripts/gmaps/geometry.js
|
49
|
+
- app/assets/javascripts/gmaps/layers.js
|
50
|
+
- app/assets/javascripts/gmaps/map_types.js
|
51
|
+
- app/assets/javascripts/gmaps/markers.js
|
52
|
+
- app/assets/javascripts/gmaps/native_extensions.js
|
53
|
+
- app/assets/javascripts/gmaps/overlays.js
|
54
|
+
- app/assets/javascripts/gmaps/routes.js
|
55
|
+
- app/assets/javascripts/gmaps/static.js
|
56
|
+
- app/assets/javascripts/gmaps/streetview.js
|
57
|
+
- app/assets/javascripts/gmaps/styles.js
|
58
|
+
- app/assets/javascripts/gmaps/utils.js
|
59
59
|
- lib/gmapsjs-rails.rb
|
60
60
|
- lib/gmapsjs-rails/engine.rb
|
61
61
|
- lib/gmapsjs-rails/version.rb
|
@@ -79,8 +79,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
79
79
|
version: '0'
|
80
80
|
requirements: []
|
81
81
|
rubyforge_project:
|
82
|
-
rubygems_version: 2.2.
|
82
|
+
rubygems_version: 2.2.2
|
83
83
|
signing_key:
|
84
84
|
specification_version: 4
|
85
85
|
summary: an asset gemification of the gmaps.js javascript library
|
86
86
|
test_files: []
|
87
|
+
has_rdoc:
|