gmpoint 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +7 -0
- data/VERSION +1 -1
- data/app/assets/javascripts/locations.js.coffee +1 -0
- data/app/helpers/gmpoint/gmpoint_helper.rb +2 -2
- data/gmpoint.gemspec +1 -1
- metadata +2 -2
data/README.markdown
CHANGED
@@ -57,3 +57,10 @@ This is gem for help to point on google map. You can marker your address and sea
|
|
57
57
|
Example:
|
58
58
|
<%= show_map_helper :users, {width: 400, height: 200, searchbox_width: 300} %>
|
59
59
|
|
60
|
+
#### You can set latitude and longitude default for your place
|
61
|
+
|
62
|
+
<%= show_map_helper :users, {latitude: 1.3028, longitude: 103.35, allow: 'show', searchbox: 'none', width: 400, height: 200, searchbox_width: 300} %>
|
63
|
+
|
64
|
+
#### You can set zoom for map
|
65
|
+
|
66
|
+
<%= show_map_helper :users, {zoom: 10, latitude: 1.3028, longitude: 103.35, allow: 'show', searchbox: 'none', width: 400, height: 200, searchbox_width: 300} %>
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.5
|
@@ -2,6 +2,7 @@
|
|
2
2
|
# All this logic will automatically be available in application.js.
|
3
3
|
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
|
4
4
|
window.initJsMap = ->
|
5
|
+
window.geopoint_search_map($("#gmpoint_location_address"))
|
5
6
|
$("#geopoint_search_box_container input").keypress (e) ->
|
6
7
|
if e.keyCode == 13 # enter
|
7
8
|
window.geopoint_search_map($(@))
|
@@ -10,13 +10,13 @@ module Gmpoint::GmpointHelper
|
|
10
10
|
@address = object.location_address
|
11
11
|
@latitude = object.location_latitude
|
12
12
|
@longitude = object.location_longitude
|
13
|
-
opts = {allow: 'show', searchbox: 'show', width: 800, height: 400, latitude:
|
13
|
+
opts = {allow: 'show', searchbox: 'show', width: 800, height: 400, latitude: "#{@latitude}", longitude: "#{@longitude}", address: "#{@address}" zoom: 13, style: "border: 1px solid #green;", searchbox_width: 400}.merge(opts)
|
14
14
|
[
|
15
15
|
content_tag(:div, :id => "geopoint_search_box_container", style: "width: #{opts[:searchbox_width]}px; margin: 0 auto; margin-bottom: 10px; display: #{opts[:searchbox]}") do
|
16
16
|
tag(:input, type: :text, placeholder: 'Search', id: "gmpoint_#{model_name}_search_box", style: "width: #{opts[:searchbox_width]}px; border:1px solid #{:color};")
|
17
17
|
end,
|
18
18
|
content_tag(:div, '', id: "map_canvas", style: "width: #{opts[:width]}px; height: #{opts[:height]}px; #{opts[:style]}"),
|
19
|
-
content_tag(:div, '', class: "data-location", data: {model: model_name, latitude: opts[:latitude] , longitude: opts[:longitude]
|
19
|
+
content_tag(:div, '', class: "data-location", data: {model: model_name, address:opts[:address], latitude: opts[:latitude] , longitude: opts[:longitude], zoom: opts[:zoom]}),
|
20
20
|
tag(:input, type: :hidden, value: "#{opts[:allow]}", name: "allow", id: "gmpoint_map_allow"),
|
21
21
|
tag(:input, type: :hidden, value: "#{@latitude}", name: "#{model_name}[location_latitude]", id: "gmpoint_location_latitude"),
|
22
22
|
tag(:input, type: :hidden, value: "#{@longitude}", name: "#{model_name}[location_longitude]", id: "gmpoint_location_longitude"),
|
data/gmpoint.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gmpoint
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -150,7 +150,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
150
150
|
version: '0'
|
151
151
|
segments:
|
152
152
|
- 0
|
153
|
-
hash:
|
153
|
+
hash: 3518780868621753732
|
154
154
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
155
155
|
none: false
|
156
156
|
requirements:
|