ruby - getting latitude and longitude values from controller in rails-geocoder gem -
is possible latitude , longitude values in controller when using geocoder gem in rails?
what doing getting nearby location pass location name below.
event_address = event.near(location, 15, order: 'distance')
so there way fetch lat , lng used above requested location using later in subsequent requests same location?
@latitude= #some method
@longitude= #some_method
geocoder.coordinates(location)
for eg : geocoder.coordinates("25 main st, cooperstown, ny")
returns [42.700149, -74.922767]
Comments
Post a Comment