gmap_coordinates_picker 0.0.12 → 0.0.13

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a5a6fb35dc48340afddd15da8e5c995ed0baa66f
4
- data.tar.gz: c48e6e57b49ce0eb2c0765c295f17950b578026d
3
+ metadata.gz: b4cfba6571184c20dd751aed25d6c9a385e74650
4
+ data.tar.gz: 4933899cc88b1558a52113f43f06c3c3f46f0be0
5
5
  SHA512:
6
- metadata.gz: 6f92d1099f126be9945a484f63c5dc3fee3ed4fb7ea600479d8d8a1f230bc825035424ef6ade73d78a1e4cfa756b5d90a81c1d6175fb5e30c14facba2a3b6ddb
7
- data.tar.gz: 50ca153a3ad3e0e3bac3ab14e62ba6bc078deeff3a4d909242f6fd3e5a2c6c48cb78e359d33c6f84ce9380de20efe534ef9a239ce6f5bc2adab04717ee7e003a
6
+ metadata.gz: 914e5d5acc3ef9747638b7ca95331212f1716a0ea40ee24c84c7cab27acd812a12ce5763fc6a28b6ea405fd0475f74d43e5f5950f33f17af345968fec4bfa9f5
7
+ data.tar.gz: 6b2e9dc1b26996952d484d16b7de45f3dfc72ec011af9428f242082e3ea508973dc36d749650b989aa54eeda05ad21c7cb683d763ff5ab5a6e11ae23092646fd
data/README.md CHANGED
@@ -22,18 +22,18 @@ gem " gmap_coordinates_picker"
22
22
  Then, add in your form:
23
23
 
24
24
  ```ruby
25
- <%= form.gmap_coordinate_picker :lat_column => 'latitude', :lng_column => 'longitude' , :zoom_level => 10, :default_coordinates => [lat,lng], autocomplete: { enable: true, class: 'form-control' } %>
25
+ <%= form.gmap_coordinate_picker api_key: GOOGLE_MAP_API_KEY, :lat_column => 'latitude', :lng_column => 'longitude' , :zoom_level => 10, :default_coordinates => [lat,lng], autocomplete: { enable: true, class: 'form-control' } %>
26
26
  ```
27
27
 
28
28
  Or, user is as form helper:
29
29
 
30
30
  ```ruby
31
- <%= render_gmap_coordinate_picker :lat_column => 'latitude', :lng_column => 'longitude' , :zoom_level => 10, :default_coordinates => [lat,lng], autocomplete: { enable: true, class: 'form-control' } %>
31
+ <%= render_gmap_coordinate_picker api_key: GOOGLE_MAP_API_KEY, :lat_column => 'latitude', :lng_column => 'longitude' , :zoom_level => 10, :default_coordinates => [lat,lng], autocomplete: { enable: true, class: 'form-control' } %>
32
32
  ```
33
33
  To display static map:
34
34
 
35
35
  ```ruby
36
- <%= render_gmap_coordinate_picker :static => 'true', :zoom_level => 10 , :default_coordinates => [lat,lng] %>
36
+ <%= render_gmap_coordinate_picker api_key: GOOGLE_MAP_API_KEY, :static => 'true', :zoom_level => 10 , :default_coordinates => [lat,lng] %>
37
37
  ```
38
38
 
39
39
 
@@ -45,7 +45,7 @@ beside the option depicted on the example above it can be configured with the fo
45
45
  - `map_container_class` - custom class for the map container
46
46
  - `map_width` - default "600px
47
47
  - `map_height` - default "400px"
48
- - `api_key` - Google Map api key (optional)
48
+ - `api_key` - Google Map api key
49
49
  - 'static' - to display only static map, by default it set to false and the map will be editable
50
50
  - 'map_handler' - javascript map object to operate custom event on rendered map by default gMapObj is assigned as map object. You can implement any google map API methods like setCenter, zoom with that object
51
51
  - 'autocomplete' - enable autocomplete with input class - default "{ enable: true, class: 'form-control' }"
@@ -31,7 +31,7 @@ module GmapCoordinatesPicker
31
31
  config.default_coordinates = [23.727666666, 90.410550] #Dhaka (my home town) center point :)
32
32
  config.map_handler = 'gMapObj'
33
33
  config.zoom_level = 10
34
- config.autocomplete = { enable: true, class: 'form-control'}
34
+ config.autocomplete = { enable: false, class: 'form-control'}
35
35
  config.map_container_class = 'gmap_coordinate_picker_container'
36
36
  config.map_width = '600px'
37
37
  config.map_height = '400px'
@@ -1,3 +1,3 @@
1
1
  module GmapCoordinatesPicker
2
- VERSION = "0.0.12"
2
+ VERSION = "0.0.13"
3
3
  end
@@ -27,7 +27,7 @@ module GmapCoordinatesPicker #:nodoc
27
27
  :map_width => options[:map_width] || GmapCoordinatesPicker.config.map_width,
28
28
  :map_height => options[:map_height] || GmapCoordinatesPicker.config.map_height,
29
29
  :autocomplete => options[:autocomplete] || GmapCoordinatesPicker.config.autocomplete,
30
- :default_coordinates => options[:default_coordinates].empty? ? GmapCoordinatesPicker.config.default_coordinates : options[:default_coordinates],
30
+ :default_coordinates => default_coordinates.empty? ? GmapCoordinatesPicker.config.default_coordinates : options[:default_coordinates],
31
31
  }
32
32
 
33
33
  editable_map_locals = {
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gmap_coordinates_picker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12
4
+ version: 0.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Muntasim Ahmed