Take the 2008 Git User's Survey and help out! [ hide ]

public
Description: A fork of the Yellow Maps for Ruby plugin for Google Maps.
Homepage: http://ym4r.rubyforge.org/
Clone URL: git://github.com/bitbckt/ym4r-gm.git
Search Repo:
Basic direction functionality added
jsimpson (author)
Mon Apr 21 13:07:47 -0700 2008
commit  77821351d5f5b0c536e5fbdf89a4c853162ffa96
tree    823a6d586d8c12c07eecc2beb2e86bb1e923436f
parent  bbfc9bcfaf961b8253a70f20848a2ec45804517f
...
220
221
222
 
 
 
 
 
 
 
 
 
 
 
 
 
223
224
225
...
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
0
@@ -220,6 +220,19 @@ module Ym4r
0
         end
0
       end
0
       
0
+ # Simple GDirections support
0
+ def directions(div, dir_points)
0
+ @init << "dir_div = document.getElementById('#{div}');"
0
+ @init << "directions = new GDirections(#{@variable}, dir_div);"
0
+ @init << "dir_point_array = new Array;"
0
+ dir_points.each do |d|
0
+ @init << "dir_point_array.push('#{d}');"
0
+ end
0
+ # Error Handling
0
+ @init << "GEvent.addListener(directions, 'error', handleErrors);"
0
+
0
+ @init << "directions.loadFromWaypoints(dir_point_array);"
0
+ end
0
       #Outputs the initialization code for the map. By default, it outputs the script tags, performs the initialization in response to the onload event of the window and makes the map globally available. If you pass +true+ to the option key <tt>:full</tt>, the map will be setup in full screen, in which case it is not necessary (but not harmful) to set a size for the map div.
0
       def to_html(options = {})
0
         no_load = options[:no_load]

Comments

    No one has commented yet.