rails-gmaps 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -18
- data/app/helpers/gmaps/gmaps_helper.rb +1 -1
- data/lib/gmaps/version.rb +1 -1
- 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: 1f40e01597bebc6a749728c3dfd94334a1c04184
|
4
|
+
data.tar.gz: 728f99f40b9c9527ea375c7c525b9d85eed5e818
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb17a156d89f7be02b481c60a526bf35ca67400152e804ff1757e4c1a9179522d2bc0342baee1df8c7e43f00ee35e9c62306b834d0592d2662aeb3ecdf569af0
|
7
|
+
data.tar.gz: 7e0f16e151d3e0cb088edfe725d02dbe3f1b858f131a321e06d16fd87660795f9977983625251ad7b0a386476e30e0ac25b89e55d1100743bf10df0a801549c2
|
data/README.md
CHANGED
@@ -9,32 +9,20 @@ TODO: Delete this and the text above, and describe your gem
|
|
9
9
|
Add this line to your application's Gemfile:
|
10
10
|
|
11
11
|
```ruby
|
12
|
-
gem 'gmaps'
|
12
|
+
gem 'rails-gmaps', '~> 0.2.0', require: 'gmaps'
|
13
13
|
```
|
14
14
|
|
15
15
|
And then execute:
|
16
16
|
|
17
17
|
$ bundle
|
18
18
|
|
19
|
-
Or install it yourself as:
|
20
|
-
|
21
|
-
$ gem install gmaps
|
22
|
-
|
23
19
|
## Usage
|
24
20
|
|
25
|
-
# GMPOIT
|
26
|
-
|
27
|
-
This is gem for help to point on google map. You can marker your address and search your location
|
28
|
-
|
29
|
-
## Installation
|
30
|
-
### in your Gemfile
|
31
|
-
gem 'gmpoint', git: 'git@github.com:dangluan/gmpoint.git'
|
32
|
-
|
33
21
|
## Setting Up
|
34
22
|
|
35
23
|
bundle
|
36
|
-
rails g
|
37
|
-
rails g
|
24
|
+
rails g gmaps:install
|
25
|
+
rails g gmaps MODEL
|
38
26
|
rake db:migrate
|
39
27
|
|
40
28
|
## Usage
|
@@ -48,9 +36,9 @@ This is gem for help to point on google map. You can marker your address and sea
|
|
48
36
|
### Require locations.coffee.js into your application.js
|
49
37
|
|
50
38
|
```
|
51
|
-
|
52
|
-
|
53
|
-
|
39
|
+
.....
|
40
|
+
//= require locations
|
41
|
+
.....
|
54
42
|
```
|
55
43
|
|
56
44
|
### Add code below into any where if you want to display the map :
|
@@ -15,7 +15,7 @@ module Gmaps::GmapsHelper
|
|
15
15
|
opts = {allow: 'show', searchbox: 'show', width: '800px', height: '400px', latitude: "#{@latitude}", longitude: "#{@longitude}", address: "#{@address}", zoom: 13, style: "border: 1px solid #green;", searchbox_width: '400px'}.merge(opts)
|
16
16
|
[
|
17
17
|
content_tag(:div, :id => "geopoint_search_box_container", style: " display: #{opts[:searchbox]}") do
|
18
|
-
tag(:input, type: :text, placeholder: 'Search', id: "gmaps_#{model_name}_search_box", style: "width: #{
|
18
|
+
tag(:input, type: :text, placeholder: 'Search', id: "gmaps_#{model_name}_search_box", style: "width: #{opts[:searchbox_width]};")
|
19
19
|
end,
|
20
20
|
content_tag(:div, '', id: "map_canvas", style: "width: #{opts[:width]}; height: #{opts[:height]}; #{opts[:style]}"),
|
21
21
|
content_tag(:div, '', class: "data-location", data: {model: model_name, address:opts[:address], latitude: opts[:latitude] , longitude: opts[:longitude], zoom: opts[:zoom]}),
|
data/lib/gmaps/version.rb
CHANGED