geocoder-olleh 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/geocoder/lookups/olleh.rb +21 -26
- data/lib/geocoder/olleh/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 81db180acec343ca4cc12fe807db4b57a1da9563
|
|
4
|
+
data.tar.gz: 01cff3aecee2aab369956b3be32e82c5582d066d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e4253cb791f5d80443c2c7ed17085397d233e8f784d41fe78ca7d0bd0566c9fbd214cd32141202d6b4b283d46891750a0c65e07ed4b3424b1fadad5b79258fd0
|
|
7
|
+
data.tar.gz: c190f4d5184904b8240624dbcda44dc3fe94ab84e84a5924abc2dfda438c6d0c40d458cfd7eae97182a445f7a9740ef8e1b396529a1f43575da407f4e4188889
|
|
@@ -182,51 +182,46 @@ module Geocoder::Lookup
|
|
|
182
182
|
EY: query.options[:end_y],
|
|
183
183
|
RPTYPE: 0,
|
|
184
184
|
COORDTYPE: Olleh.route_coord_types[query.options[:coord_type]] || 7,
|
|
185
|
-
PRIORITY: Olleh.priority[query.options[:priority]]
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
(1..3).each do |x|
|
|
185
|
+
PRIORITY: Olleh.priority[query.options[:priority]]
|
|
186
|
+
}
|
|
187
|
+
(1..3).each do |x|
|
|
189
188
|
s = [query.options[:"vx#{x}"], query.options[:"vy#{x}"]]
|
|
190
189
|
hash.merge!({ "VX#{x}" => s[0], "VY#{x}" => s[1]}) unless s[0].nil? && s[1].nil?
|
|
191
190
|
end
|
|
192
|
-
|
|
193
|
-
JSON.generate(hash)
|
|
194
191
|
when "convert_coord"
|
|
195
|
-
|
|
192
|
+
hash = {
|
|
196
193
|
x: query.text.first,
|
|
197
194
|
y: query.text.last,
|
|
198
195
|
inCoordType: Olleh.coord_types[query.options[:coord_in]],
|
|
199
|
-
outCoordType: Olleh.coord_types[query.options[:coord_out]]
|
|
200
|
-
|
|
201
|
-
})
|
|
196
|
+
outCoordType: Olleh.coord_types[query.options[:coord_out]]
|
|
197
|
+
}
|
|
202
198
|
when "reverse_geocoding"
|
|
203
|
-
|
|
199
|
+
hash = {
|
|
204
200
|
x: query.text.first,
|
|
205
201
|
y: query.text.last,
|
|
206
202
|
addrcdtype: Olleh.addrcdtype[query.options[:addrcdtype]] || 0,
|
|
207
203
|
newAddr: Olleh.new_addr_types[query.options[:new_addr_type]] || 0,
|
|
208
|
-
isJibun: Olleh.include_jibun[query.options[:include_jibun]] || 0
|
|
209
|
-
|
|
210
|
-
})
|
|
204
|
+
isJibun: Olleh.include_jibun[query.options[:include_jibun]] || 0
|
|
205
|
+
}
|
|
211
206
|
when "addr_step_search"
|
|
212
|
-
|
|
213
|
-
l_Code: query.options[:l_code]
|
|
214
|
-
|
|
215
|
-
})
|
|
207
|
+
hash = {
|
|
208
|
+
l_Code: query.options[:l_code]
|
|
209
|
+
}
|
|
216
210
|
when "addr_nearest_position_search"
|
|
217
|
-
|
|
211
|
+
hash = {
|
|
218
212
|
px: query.options[:px],
|
|
219
213
|
py: query.options[:py],
|
|
220
|
-
radius: query.options[:radius]
|
|
221
|
-
|
|
222
|
-
})
|
|
214
|
+
radius: query.options[:radius]
|
|
215
|
+
}
|
|
223
216
|
else # geocoding
|
|
224
|
-
|
|
217
|
+
hash = {
|
|
225
218
|
addr: URI.encode(query.sanitized_text),
|
|
226
|
-
addrcdtype: Olleh.addrcdtype[query.options[:addrcdtype]]
|
|
227
|
-
|
|
228
|
-
})
|
|
219
|
+
addrcdtype: Olleh.addrcdtype[query.options[:addrcdtype]]
|
|
220
|
+
}
|
|
229
221
|
end
|
|
222
|
+
|
|
223
|
+
hash.merge!(timestamp: now)
|
|
224
|
+
JSON.generate(hash)
|
|
230
225
|
end
|
|
231
226
|
|
|
232
227
|
def now
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: geocoder-olleh
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jaigouk Kim
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-07-
|
|
11
|
+
date: 2015-07-18 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|