Google Polylines, bad conversion

I tried to use this Ruby Gem and encountered a problem with it. Sometimes, I have problems with the output, it seems like there is an issue with rounding when i decode a polyline. If i compare with the array received from the official “Interactive Polyline Encoder Utility”, sometimes, I haven’t the same result.

  • Rails app routes not available in engine
  • shoppe gem: ActiveRecord::RecordNotFound in ProductsController#buy
  • Ruby gem: writing tests for api wrapper
  • Workaround for superclass mismatch for class SQLiteAdapter error
  • An error occurred while installing nokogiri (1.6.0), and Bundler cannot continue
  • Developing ROR between Windows and Ubuntu machines
  • For example, the string of the polylines used is :


    See the attached two screenshot to see the difference:
    enter image description here

    enter image description here

    The first one is from the official google utilities and the second is using the gem.

    You can see that the rounding of the GPS coordinates are not the same:

    [48.87205000000001, 2.300600000000001]

    Has anyone ever experienced the same thing or does anyone know a way I could transform the result so they are the same without loosing coordinates precision in order to compare two polylines?

    Thank you,

  • Failing to install Jekyll gem native extension on Windows with “multiple target patterns”
  • Using a database within a Ruby gem
  • OS-X, Rails: “Failed to build gem native extension”
  • Heroku deployment times out at “Cleaning up the bundler cache.”
  • Reset password on sorcery isn't working
  • “Gem::InstallError: strptime requires Ruby version ~> 2.0.” even after installing the requirements
  • One Solution collect form web for “Google Polylines, bad conversion”

    This was answered on the project github issues:

    Ruby is the best programming language in the world - Ruby on Rails.