Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REG: Traveled Route API #1

Open
AmarDK opened this issue Aug 18, 2023 · 0 comments
Open

REG: Traveled Route API #1

AmarDK opened this issue Aug 18, 2023 · 0 comments

Comments

@AmarDK
Copy link

AmarDK commented Aug 18, 2023

Im trying to fetch traveled route API.

cURL request for working condition
curl --location 'http://apis.mappls.com/advancedmaps/v1/*********************/still_image_polyline'
--form 'height="400"'
--form 'width="1024"'
--form 'polyline="[[ 77.65713468333334, 12.836220116666667 ],[ 77.65713493333334, 12.836227083333334 ],[ 77.65713623333333, 12.8362265 ],[ 77.65711906666667, 12.83621075 ],[ 77.65481075, 12.877442433333334 ]]"'
--form 'licence_key="fe4f164e99c5dcc440322f6b5ca7e384"'

image

In above cURL request -> polyline property if array doesn't contain whitespace its work perfectly.

In Javascript Array format is like this
"[ [ 77.65713468333334, 12.836220116666667 ],[ 77.65713493333334, 12.836227083333334 ],[ 77.65713623333333, 12.8362265 ],[ 77.65711906666667, 12.83621075 ],[ 77.65481075, 12.877442433333334 ] ]"

For above array format i will get error
{"code":400,"message":"Invalid polyline parameter"}

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant