module OnTheMap::GeoLocatable
Public Instance Methods
geocodable?()
click to toggle source
# File lib/on_the_map/geo_locatable.rb, line 69 def geocodable? !position && geolocatable? || address.changed? end
geocoding?()
click to toggle source
# File lib/on_the_map/geo_locatable.rb, line 82 def geocoding? @geocoding_started == true end
geolocatable?()
click to toggle source
# File lib/on_the_map/geo_locatable.rb, line 73 def geolocatable? address && address.geolocatable? end
latitude()
click to toggle source
# File lib/on_the_map/geo_locatable.rb, line 57 def latitude perform_geocoding unless position position[1].to_i if position end
Also aliased as: lat
longitude()
click to toggle source
# File lib/on_the_map/geo_locatable.rb, line 63 def longitude perform_geocoding unless position position[0].to_i if position end
Also aliased as: lng
perform_geocoding()
click to toggle source
# File lib/on_the_map/geo_locatable.rb, line 77 def perform_geocoding geocode if geocodable? && !geocoding? end
Also aliased as: perform_geocoding!
Protected Instance Methods
geocoding_done!()
click to toggle source
# File lib/on_the_map/geo_locatable.rb, line 92 def geocoding_done! @geocoding_started = false end
geocoding_started!()
click to toggle source
# File lib/on_the_map/geo_locatable.rb, line 88 def geocoding_started! @geocoding_started = true end