orochi 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.textile +7 -3
- data/VERSION +1 -1
- data/lib/orochi/acts_as_routeable.rb +4 -3
- data/orochi.gemspec +1 -1
- metadata +3 -3
data/README.textile
CHANGED
@@ -40,6 +40,10 @@ p. Now you're set up and ready to go!
|
|
40
40
|
|
41
41
|
h2. ghetto usage
|
42
42
|
|
43
|
-
pre. your_model_instance.
|
44
|
-
your_model_instance.
|
45
|
-
|
43
|
+
pre. your_model_instance.set_endpoints!("start_address", "stop_address")
|
44
|
+
your_model_instance.route!
|
45
|
+
|
46
|
+
p. Now you can do some of the following:
|
47
|
+
|
48
|
+
pre.# Get the polyline of your route
|
49
|
+
your_model_instance.polyline
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.5
|
@@ -57,7 +57,7 @@ module Orochi
|
|
57
57
|
polyline.push([point[0], point[1]])
|
58
58
|
end
|
59
59
|
|
60
|
-
s.polyline_json = polyline
|
60
|
+
s.polyline_json = polyline.inspect
|
61
61
|
s.directions_json = leg_step["html_instructions"]
|
62
62
|
s.save!
|
63
63
|
end
|
@@ -76,10 +76,11 @@ module Orochi
|
|
76
76
|
end
|
77
77
|
|
78
78
|
def polyline
|
79
|
+
polyline = []
|
79
80
|
routes.first.each_step do |step|
|
80
|
-
|
81
|
-
puts
|
81
|
+
polyline.push(step.polyline_json.to_a)
|
82
82
|
end
|
83
|
+
polyline.flatten
|
83
84
|
end
|
84
85
|
|
85
86
|
def directions_to
|
data/orochi.gemspec
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: orochi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 5
|
10
|
+
version: 0.0.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- kellydunn
|