View Source ExMaps.RequestString (ExMaps v1.1.3)

Provides functions for creating request strings for the Google Maps API.

This module builds request strings based on the provided parameters, including coordinates and options.

Summary

Functions

Builds a request string based on the provided coordinates and options.

Functions

Link to this function

build(coordinates, options)

View Source
@spec build(
  map(),
  keyword()
) :: String.t()

Builds a request string based on the provided coordinates and options.

Parameters

  • coordinates: A map containing the coordinates for the request.
  • options: A keyword list of options to customize the request.

Examples

iex> ExMaps.RequestString.build(%{origin: "A", destination: "B"}, key: :value)
"https://maps.googleapis.com/maps/api/directions/json?origin=A&destination=B&key=YOUR_API_KEY"

Returns

  • A string representing the complete request URL.