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
Post a Comment