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

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -