class BlacklightMaps::Geometry::Point

This class contains Point objects and methods for working with them

Public Class Methods

from_lat_lon_string(points) click to toggle source

Creates a new point from from a coordinate string “-50,100” (lat,long)

# File lib/blacklight/maps/geometry.rb, line 77
def self.from_lat_lon_string(points)
  new(points.split(',').reverse)
end
new(points) click to toggle source

points is an array corresponding to the longitude and latitude values

long, lat
# File lib/blacklight/maps/geometry.rb, line 62
def initialize(points)
  @long = points[0].to_f
  @lat = points[1].to_f
end

Public Instance Methods