geocoder-olleh 0.1.7 → 0.1.8

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4dc80f269fca7b636c670d2982c0abc0062ba012
4
- data.tar.gz: 2beeb582301bed694100c15b7d645db1df8499a2
3
+ metadata.gz: 9084529acd8bb237287a9ab61df9f9e0d39ab610
4
+ data.tar.gz: d4c9baa92b0a3d5ac25ed3fd228a42733df70611
5
5
  SHA512:
6
- metadata.gz: 5d40fd93449d03a737112009d4b5908a2bc9699a89164089ff80bd57b1599aacb6ae3f6ebab411e0149b20ddc19a01e7031991ff519aa18c28917f1fc47b96c4
7
- data.tar.gz: 3d14a3ea60fec075ff62fcf48400f06dd5290ccd9e0286f787ea8dea27b0ac3fda2edefe672b9568fe16142cd2f803f0c52f191130fdb9a217d5ded2aaa9fce5
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
- JSON.generate({
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,
@@ -1,5 +1,5 @@
1
1
  module Geocoder
2
2
  module Olleh
3
- VERSION = "0.1.7"
3
+ VERSION = "0.1.8"
4
4
  end
5
5
  end
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.7
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-05-25 00:00:00.000000000 Z
11
+ date: 2015-06-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler