Ruby on Rails: Splitting out lat and long from -


I have this code:

  include Geokit :: Geocoders res = MultiGeocoder. Geocode ('100 Spear St, San Francisco, CA') puts res.ll   

The result will be something like this: 37.7922379, -122.3939656

I need it

So, lat = some tall = some

I think it works?

  res = late long strong (',') lat = latLongArray [0] long = latLongArray [1]  / code>  

Not the best Ruby code?

Any help appreciated.

You can use it:

  lat, lng = Res.ll.split (",")    

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -