Backend API. Server-side code: this runs in a Codename One backend, not in the app on the device.
package com.codename1.backend.osm
OpenStreetMap routing and geocoding served by the backend itself, from one
.osm.pbf extract: OsmExtract loads it,
OsmRouting answers OSRM-shaped routes and
OsmGeocoding answers Nominatim-shaped place
searches. Together with MapTiles in the parent package, an application
can show, search and route on a map with no third-party map server.
The data is OpenStreetMap’s, under the Open Database License 1.0; an application must credit “OpenStreetMap contributors” where its users see the map, the routes or the places (https://www.openstreetmap.org/copyright).
Types
class OsmExtract | A road network and a place index built from one OpenStreetMap .osm.pbf extract, shared by OsmRouting and OsmGeocoding. |
class OsmGeocoding | Answers place searches and reverse lookups in the shape of Nominatim’s JSON API, from the places, addresses and named streets of an extract. |
class OsmRouting | Answers turn-by-turn routes in the shape of OSRM’s HTTP API, so the client’s OsrmRouteService – or any other OSRM client – can point at this backend instead of a separate routing server. |