Contact us.Īs you can see, a polyline is a chain of characters that, when interpreted correctly by a cartographic application, appears as a path on a map. The request is incomplete or contains an error. The table below describes the meaning of the various codes you may encounter using our API. For any other value returned, the query will fail. There is no cache associated with this API, and therefore no gain in repeating a calculation several times.įor an impeccable superposition of the polyline with your background map, we recommend that you use a map from the OpenStreetMap project. You can use this API in conjunction with our Route Optimization API or our geocoding API. For further information on JSON, visit which provides a full comprehensive list of decoding libraries in different languages. Actually, other data may intermingle in the future and this is the only way to maintain correct compatibility. When treating this JSON object, you must retrieve the values through their associated chain, and not by their position in the document and their number in line. For better legibility, the polyline has been truncated and therefore not valid. The above block is a result produced by our API. Note that a valid authentication key is required. Here’s what the query for the polylines API looks like. Let us take the example of the route itinerary between Paris and Lyon (France). Mode of transport vehicule (driving) or foot (walking). The numbers must be a maximum of 10 decimal places. ParameterĬoordinate of the point of departure. In the table below, asterisks * indicate the parameters that are required to start a calculation. To work, this API needs data that is provided as URL parameters. The response time of this API is less than 100ms, whether the requests were previously requested or not. The compression is particularly effective with this API, which is why it is important to enable it. This reduces the download time of the data by almost 50%. To verify that compression is active, the client request header must haveĪccept - Encoding : "gzip, deflate" and the response header of the server must haveĬontent - Encoding : "gzip" . Recent browsers automatically encode URLs but not always HTTP libraries.Īll of our APIs support gzip compression, so it is strongly recommended to enable this feature in your HTTP client. This optimization API is not likely to receive special or accented characters, but URLs must still be properly encoded. It can therefore be used from a standard web browser or any other library which enables the data download from a web server. This API uses the GET method implemented in the HTTP 1.1 protocol. Requesting a track with the API Protocol used To draw a step, a polyline is used, that is to say a broken line consisting of a succession of GPS coordinates. A step connects a starting point and a destination. In the image above, we notice the red markers, and the steps in blue. The red markers are linked through the roads in blue.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |