When I use the map matching API, I can select the. GPX file on the web page to calculate the results normally.
However, when I try to use the URL statement, I will feedback '{“code”: 400, “message”: “unable to process JSON”}
The following is my Python code. If you have any suggestions, I will be grateful!
headers = {
'content-type': 'application/gpx+xml',
}
files = {'test.gpx':open('test.gpx', 'rb')}
url = 'http://localhost:8989/match?profile=car&type=json'
params = {
'details': 'street_name',
'points_encoded': 'FALSE'
}
response = requests.post(url, headers=headers, files=files,params=params)