Skip to content

REG: Traveled Route API #1

Description

@AmarDK

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions