Im trying to send requests to the Google Elevation API, I have successfully sent singular requests. Stated in the documentation for GE API is that a singular request can contain many coordinate evaluations if the coordinates are passed as a list separated by "|".
As you can see in my code I am following the format with requests containing something like this >> 3.222,54.333 | 2.444, 66.4332 | ...
This should be working from what I can tell but clearly something is wrong.
here is a segment of the code, the program breaks at the error point within this block.
finalStringConvertedCoordinates = processedQueryPoints.joined(separator: "|")
let apiKey = "REDACTED"
guard let url = URL(string: "https://maps.googleapis.com/maps/api/elevation/json?key=\(apiKey)&locations=\(finalStringConvertedCoordinates)") else {
print("Error: cannot create URL")
return