# A Polyline Is Not a Route

DevFeed: [A Polyline Is Not a Route](<https://devfeed.tech/articles/a-polyline-is-not-a-route-19500.md>)

Original publisher: [Read original article](<https://www.codenameone.com/blog/road-following-map-routing/>)

Author: Shai Almog

Published: 2026-08-03T00:00:00Z

Content type: tutorial

Language: en

Sources: [CodeName One](<https://devfeed.tech/sources/codename-one.md>)

Topics: [API](<https://devfeed.tech/topics/api.md>), [Routing (disambiguation)](<https://devfeed.tech/topics/routing.md>), [Open Source](<https://devfeed.tech/topics/open-source.md>), [Self-hosted](<https://devfeed.tech/topics/self-hosted.md>), [Server](<https://devfeed.tech/topics/server.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [backend](<https://devfeed.tech/tags/backend.md>), [code](<https://devfeed.tech/tags/code.md>), [implementation](<https://devfeed.tech/tags/implementation.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [route](<https://devfeed.tech/tags/route.md>), [routing](<https://devfeed.tech/tags/routing.md>), [self-hosted](<https://devfeed.tech/tags/self-hosted.md>), [server](<https://devfeed.tech/tags/server.md>)

## AI overview

This article explains a Codename One maps routing API that converts coordinates into road-following routes and provides geometry, distance, duration, alternatives, legs, and step instructions. It describes the callback behavior, encoded geometry support, and use of OSRM as the default service, while noting that the public demonstration server is unsuitable for production and that applications can use a self-hosted or other provider.

## Source excerpt

The new Codename One maps routing API turns coordinates into road-following geometry, distance, duration, legs, and steps through OSRM or an application-defined service.