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

AbotX : How do you create a parallel crawler that stays on and can be added to at run time from new requests -

testing - Detect whether test has failed within fixture -

android - Create single AAR file from multiple modules using Gradle -