Ruby Polyline Decoder For Google Maps
As promised I have finished the ruby polyline decoder. This class will take an encoded polyline and decode it returning an array of latitude and longitude values. This one gave me a headache. Hope you can find use of it. Please take time to tell me the projects you are using it for, I’m just nosy.
Usage example:
require ‘polyline_decoder’
line = “{b~zEdruxPT?L|@PP”
polyline_decoder = PolylineDecoder.new
line_arr = polyline_decoder.decode(line)
line_arr.each do |ln|
puts ln[0].to_s + “, ” + ln[1].to_s
end
That’s it!

Thank you!
October 24, 2008 at 5:20 am
Thanks man! This is what I needed.
October 13, 2009 at 11:07 am
Hey, file link is broken… any chance we can get an updated link?
Thanks…
September 3, 2010 at 6:57 pm