geocoder-olleh 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/geocoder/lookups/olleh.rb +7 -8
- 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: 9084529acd8bb237287a9ab61df9f9e0d39ab610
|
4
|
+
data.tar.gz: d4c9baa92b0a3d5ac25ed3fd228a42733df70611
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 66753e0997ef21a6e50ac2c8f9a34923d3448300e2025c8d0dfc5e3e98e593c3cc6c7e411b609e060cc5e185fec8613546fa4e3c1c152ef5aec6cb86704c1dc7
|
7
|
+
data.tar.gz: ba56a133ba7a59b8f02aad778060611b6a2f1e20256401c6378d630fda6fe7c5ca5644f36056d9c894e2b6013b54894bbafbef08841c86d8d272e25d760af2e3
|
@@ -167,22 +167,21 @@ module Geocoder::Lookup
|
|
167
167
|
def query_url_params(query)
|
168
168
|
case Olleh.check_query_type(query)
|
169
169
|
when "route_search"
|
170
|
-
|
170
|
+
hash = {
|
171
171
|
SX: query.options[:start_x],
|
172
172
|
SY: query.options[:start_y],
|
173
173
|
EX: query.options[:end_x],
|
174
174
|
EY: query.options[:end_y],
|
175
|
-
VX1: query.options[:vx1],
|
176
|
-
VY1: query.options[:vy1],
|
177
|
-
VX2: query.options[:vx2],
|
178
|
-
VY2: query.options[:vy2],
|
179
|
-
VX3: query.options[:vx3],
|
180
|
-
VY3: query.options[:vy3],
|
181
175
|
RPTYPE: 0,
|
182
176
|
COORDTYPE: Olleh.route_coord_types[query.options[:coord_type]] || 7,
|
183
177
|
PRIORITY: Olleh.priority[query.options[:priority]],
|
184
178
|
timestamp: now
|
185
|
-
}
|
179
|
+
}
|
180
|
+
(1..3).each do |x|
|
181
|
+
s = [query.options["vx#{x}"], query.options["vy#{x}"]]
|
182
|
+
hash.merge!({ "VX#{x}": s[0], "VY#{x}": s[1]}) unless s[0].nil? && s[1].nil?
|
183
|
+
end
|
184
|
+
JSON.generate(hash)
|
186
185
|
when "convert_coord"
|
187
186
|
JSON.generate({
|
188
187
|
x: query.text.first,
|
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.1.
|
4
|
+
version: 0.1.8
|
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-
|
11
|
+
date: 2015-06-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|