geo_magic 0.2.1.4 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/geo_magic.gemspec +1 -1
- data/lib/geo_magic/util.rb +16 -1
- data/spec/geo_magic/geocoder_spec.rb +5 -0
- metadata +3 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.2
|
data/geo_magic.gemspec
CHANGED
data/lib/geo_magic/util.rb
CHANGED
@@ -60,7 +60,22 @@ module GeoMagic
|
|
60
60
|
|
61
61
|
def within_rectangle rectangle
|
62
62
|
self.select do |point|
|
63
|
-
|
63
|
+
puts "point: #{point.inspect}"
|
64
|
+
|
65
|
+
if point.respond_to? :person
|
66
|
+
puts "indiv adr: #{point.person.address}"
|
67
|
+
puts "adr loc: #{point.person.address.location}"
|
68
|
+
puts "loc: #{point.location}"
|
69
|
+
end
|
70
|
+
if point.respond_to? :company
|
71
|
+
puts "company adr: #{point.company.address}"
|
72
|
+
puts "adr loc: #{point.company.address.location}"
|
73
|
+
puts "loc: #{point.location}"
|
74
|
+
end
|
75
|
+
|
76
|
+
obj = get_dist_obj(point)
|
77
|
+
puts "dist obj: #{obj.inspect}"
|
78
|
+
rectangle.overlaps? obj
|
64
79
|
end
|
65
80
|
end
|
66
81
|
|
@@ -12,6 +12,11 @@ describe "GeoMagic Geocoder" do
|
|
12
12
|
location.city.should == 'Munich'
|
13
13
|
end
|
14
14
|
|
15
|
+
it "should find location" do
|
16
|
+
location = @geocoder.instance.geocode "Marienplatz 14, munich, Germany"
|
17
|
+
p location.latitude
|
18
|
+
p location.longitude
|
19
|
+
end
|
15
20
|
|
16
21
|
# it "should geocode for rails" do
|
17
22
|
# @geocoder = GeoMap.geo_coder :env => :rails
|
metadata
CHANGED
@@ -5,9 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 2
|
8
|
-
-
|
9
|
-
|
10
|
-
version: 0.2.1.4
|
8
|
+
- 2
|
9
|
+
version: 0.2.2
|
11
10
|
platform: ruby
|
12
11
|
authors:
|
13
12
|
- Kristian Mandrup
|
@@ -193,7 +192,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
193
192
|
requirements:
|
194
193
|
- - ">="
|
195
194
|
- !ruby/object:Gem::Version
|
196
|
-
hash:
|
195
|
+
hash: -4352161628572186058
|
197
196
|
segments:
|
198
197
|
- 0
|
199
198
|
version: "0"
|