Method: GoogleMapsService::Apis::Roads#snapped_speed_limits
- Defined in:
- lib/google_maps_service/apis/roads.rb
permalink #snapped_speed_limits(path) ⇒ Hash
Returns the posted speed limit (in km/h) for given road segments.
The provided points will first be snapped to the most likely roads the vehicle was traveling along.
94 95 96 97 98 99 100 101 102 103 104 105 |
# File 'lib/google_maps_service/apis/roads.rb', line 94 def snapped_speed_limits(path) path = GoogleMapsService::Convert.waypoints(path) params = { path: path } return get('/v1/speedLimits', params, base_url: ROADS_BASE_URL, accepts_client_id: false, custom_response_decoder: method(:extract_roads_body)) end |