gmaps4rails 0.8.0 → 0.8.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  <% #thanks to enable_css, user can avoid this css to be loaded
2
- if enable_css == true %>
2
+ if enable_css == true %>
3
3
  <% content_for :head do %>
4
4
  <%= stylesheet_link_tag 'gmaps4rails' %>
5
5
  <% end %>
@@ -7,18 +7,27 @@
7
7
 
8
8
  <% content_for :scripts do %>
9
9
  <% if enable_js == true %>
10
- <script src="http://www.google.com/jsapi"></script>
10
+ <!-- <script src="http://www.google.com/jsapi"></script> -->
11
11
  <%=javascript_include_tag 'gmaps4rails' %>
12
12
  <% unless options["markers"].nil? or (!options["markers"]["options"].nil? and options["markers"]["options"]["do_clustering"] == false) %>
13
13
  <script type="text/javascript" src='http://google-maps-utility-library-v3.googlecode.com/svn/tags/markerclusterer/1.0/src/markerclusterer_compiled.js'></script>
14
14
  <% end %>
15
15
  <% end %>
16
16
  <script type="text/javascript" charset="utf-8">
17
-
18
- window.onload = function() {
19
- <% #true is passed here to trigger map initialization %>
20
- <%=raw options.to_gmaps4rails(true) %>
17
+ function gmaps4rails_init() {
18
+ <% #true is passed here to trigger map initialization %>
19
+ <%=raw options.to_gmaps4rails(true) %>
20
+ }
21
+
22
+ function gmaps4rails_loadScript() {
23
+ var script = document.createElement("script");
24
+ script.type = "text/javascript";
25
+ script.src = "http://maps.google.com/maps/api/js?sensor=false&libraries=geometry&callback=gmaps4rails_init";
26
+ document.body.appendChild(script);
21
27
  }
28
+
29
+ window.onload = gmaps4rails_loadScript;
30
+
22
31
  </script>
23
32
  <% end %>
24
33
 
@@ -1,5 +1,3 @@
1
- google.load('maps', '3', { other_params: 'libraries=geometry&sensor=false' });
2
-
3
1
  var Gmaps4Rails = {
4
2
  //map config
5
3
  map: null, //contains the map we're working on
@@ -7,7 +7,7 @@ require 'capybara/rspec'
7
7
  # Requires supporting ruby files with custom matchers and macros, etc,
8
8
  # in spec/support/ and its subdirectories.
9
9
  Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
10
- Capybara.server_boot_timeout = 50
10
+ Capybara.server_boot_timeout = 90
11
11
 
12
12
  RSpec.configure do |config|
13
13
  # == Mock Framework
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gmaps4rails
3
3
  version: !ruby/object:Gem::Version
4
- hash: 63
4
+ hash: 61
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 8
9
- - 0
10
- version: 0.8.0
9
+ - 1
10
+ version: 0.8.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Benjamin Roth
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-04-30 00:00:00 +02:00
19
+ date: 2011-05-03 00:00:00 +02:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
@@ -33,8 +33,10 @@ dependencies:
33
33
  version: "0"
34
34
  type: :runtime
35
35
  version_requirements: *id001
36
- description: Enables easy display of items (taken from a Rails 3 model) on a Google Map. Uses Javascript API V3. Provides a helper and much configuration.
37
- email: benjamin.roth@peachyweb.com
36
+ description: "Enables easy display of items (taken from a Rails 3 model) on a Google Maps (JS API V3). Geocoding + Directions included. Provides much options: markers customization, infowindows, auto-adjusted zoom, polylines, polygons, circles etc... See wiki on github for full description and examples."
37
+ email:
38
+ - apnea.diving.deep@gmail.com
39
+ - david.ruyer@gmail.com
38
40
  executables: []
39
41
 
40
42
  extensions: []
@@ -121,7 +123,7 @@ rubyforge_project:
121
123
  rubygems_version: 1.3.7
122
124
  signing_key:
123
125
  specification_version: 3
124
- summary: Enables easy display of items (taken from a Rails 3 model) on a Google Map. Uses Javascript API V3.
126
+ summary: Enables easy display of items (taken from a Rails 3 model) on a Google Maps (JS API V3). Geocoding + Directions included.
125
127
  test_files:
126
128
  - test/dummy/app/controllers/application_controller.rb
127
129
  - test/dummy/app/controllers/users_controller.rb