class MapboxDirections::Point

Attributes

lat[R]
lng[R]

Public Class Methods

from_geojson(geojson) click to toggle source
# File lib/mapbox_directions/model/point.rb, line 7
def self.from_geojson(geojson)
  coords = geojson["geometry"]["coordinates"]
  new(coords.last, coords.first)
end
new(lat, lng) click to toggle source
# File lib/mapbox_directions/model/point.rb, line 12
def initialize(lat, lng)
  @lat = lat
  @lng = lng
end