Module: Mapbox::HashUtils

Included in:
Directions, Geocoder, MapMatching, Matrix, Optimization, Tilequery
Defined in:
lib/mapbox.rb

Instance Method Summary collapse

Instance Method Details

#xy_from_hash(h = {}) ⇒ Object



173
174
175
176
# File 'lib/mapbox.rb', line 173

def xy_from_hash h = {}
  [ h.fetch(:longitude){ h[LONGITUDE_KEY] },
    h.fetch(:latitude){ h[LATITUDE_KEY] } ]
end