class LayersOfLondon::Booth::MapTool::Configuration
Attributes
north_west_extent[RW]
south_east_extent[RW]
square_size[RW]
Public Instance Methods
north_east()
click to toggle source
# File lib/layers_of_london/booth/map_tool.rb, line 28 def north_east @north_east ||= Geokit::LatLng.new(north_west.lat, south_east.lng) end
north_west()
click to toggle source
# File lib/layers_of_london/booth/map_tool.rb, line 20 def north_west @north_west ||= Geokit::LatLng.new(*@north_west_extent) end
south_east()
click to toggle source
# File lib/layers_of_london/booth/map_tool.rb, line 24 def south_east @south_east ||= Geokit::LatLng.new(*@south_east_extent) end
south_west()
click to toggle source
# File lib/layers_of_london/booth/map_tool.rb, line 32 def south_west @south_west ||= Geokit::LatLng.new(south_east.lat, north_west.lng) end
squares_x()
click to toggle source
# File lib/layers_of_london/booth/map_tool.rb, line 36 def squares_x @squares_x ||= (north_west.distance_to(north_east, units: :meters) / @square_size).ceil end
squares_y()
click to toggle source
# File lib/layers_of_london/booth/map_tool.rb, line 40 def squares_y @squares_y ||= (north_west.distance_to(south_west, units: :meters) / @square_size).ceil end