ó
    =šŠhè  ã                   ó$   • S r SSKJr     SS jrg)z9Performs requests to the Google Maps Distance Matrix API.é    )ÚconvertNc                 óR  • [         R                  " U5      [         R                  " U5      S.nU(       a  US;  a  [        S5      eX=S'   U(       a  XMS'   U(       a  US;  a  [        S5      eX]S'   U(       a  XmS	'   U(       a  [         R                  " U5      US
'   U(       a  [         R                  " U5      US'   U(       a  U(       a  [        S5      eU	(       a  [         R                  " SU	5      US'   U
(       a  X­S'   U(       a  X½S'   U(       a  XÍS'   U R                  SU5      $ )a¨  Gets travel distance and time for a matrix of origins and destinations.

:param origins: One or more addresses, Place IDs, and/or latitude/longitude
    values, from which to calculate distance and time. Each Place ID string
    must be prepended with 'place_id:'. If you pass an address as a string,
    the service will geocode the string and convert it to a
    latitude/longitude coordinate to calculate directions.
:type origins: a single location, or a list of locations, where a
    location is a string, dict, list, or tuple

:param destinations: One or more addresses, Place IDs, and/or lat/lng values
    , to which to calculate distance and time. Each Place ID string must be
    prepended with 'place_id:'. If you pass an address as a string, the
    service will geocode the string and convert it to a latitude/longitude
    coordinate to calculate directions.
:type destinations: a single location, or a list of locations, where a
    location is a string, dict, list, or tuple

:param mode: Specifies the mode of transport to use when calculating
    directions. Valid values are "driving", "walking", "transit" or
    "bicycling".
:type mode: string

:param language: The language in which to return results.
:type language: string

:param avoid: Indicates that the calculated route(s) should avoid the
    indicated features. Valid values are "tolls", "highways" or "ferries".
:type avoid: string

:param units: Specifies the unit system to use when displaying results.
    Valid values are "metric" or "imperial".
:type units: string

:param departure_time: Specifies the desired time of departure.
:type departure_time: int or datetime.datetime

:param arrival_time: Specifies the desired time of arrival for transit
    directions. Note: you can't specify both departure_time and
    arrival_time.
:type arrival_time: int or datetime.datetime

:param transit_mode: Specifies one or more preferred modes of transit.
    This parameter may only be specified for requests where the mode is
    transit. Valid values are "bus", "subway", "train", "tram", "rail".
    "rail" is equivalent to ["train", "tram", "subway"].
:type transit_mode: string or list of strings

:param transit_routing_preference: Specifies preferences for transit
    requests. Valid values are "less_walking" or "fewer_transfers".
:type transit_routing_preference: string

:param traffic_model: Specifies the predictive travel time model to use.
    Valid values are "best_guess" or "optimistic" or "pessimistic".
    The traffic_model parameter may only be specified for requests where
    the travel mode is driving, and where the request includes a
    departure_time.

:param region: Specifies the prefered region the geocoder should search
    first, but it will not restrict the results to only this region. Valid
    values are a ccTLD code.
:type region: string

:rtype: matrix of distances. Results are returned in rows, each row
    containing one origin paired with each destination.
)ÚoriginsÚdestinations)ÚdrivingÚwalkingÚ	bicyclingÚtransitzInvalid travel mode.ÚmodeÚlanguage)ÚtollsÚhighwaysÚferrieszInvalid route restriction.ÚavoidÚunitsÚdeparture_timeÚarrival_timez7Should not specify both departure_time andarrival_time.Ú|Útransit_modeÚtransit_routing_preferenceÚtraffic_modelÚregionz/maps/api/distancematrix/json)r   Úlocation_listÚ
ValueErrorÚtimeÚ	join_listÚ_request)Úclientr   r   r   r   r   r   r   r   r   r   r   r   Úparamss                 ÚmC:\Users\julio\OneDrive\Documentos\Trabajo\Ideas Frescas\venv\Lib\site-packages\googlemaps/distance_matrix.pyÚdistance_matrixr!      s  € ôP ×(Ò(¨Ó1Ü×-Ò-¨lÓ;ñ€Fö
 ð ÐEÓEÜÐ3Ó4Ð4Øˆv‰æØ%ˆzÑæØÐ8Ó8ÜÐ9Ó:Ð:Øˆw‰æØˆw‰æÜ#*§<¢<°Ó#?ˆÐÑ æÜ!(§¢¨lÓ!;ˆˆ~Ñæž,Üð )ó *ð 	*ö Ü!(×!2Ò!2°3¸Ó!Eˆˆ~Ñæ!Ø/IÐ+Ñ,æØ"/ˆÑæØ!ˆxÑà?‰?Ð:¸FÓCÐCó    )
NNNNNNNNNN)Ú__doc__Ú
googlemapsr   r!   © r"   r    Ú<module>r&      s"   ðñ$ @å ð AEØIMØPTõtDr"   