PHP Openstreetmap Route API: Calculate route between two locations with OSM API

Recommend this page to a friend!
  Info   View files Example   View files View files (6)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 133 This week: 2All time: 9,099 This week: 146Up
Version License PHP version Categories
osmroute 1.0.0Freely Distributable5PHP 5, Web services, Geography
Description Author

This class can calculate routes between two locations with OpenStreetMap API.

It can send HTTP requests to the OpenStreetMap API Web server to query the route between two given locations, using a given type of vehicle.

The class can return the route details like the distance to travel, the duration of the trip, trip instructions, and a list of segments that connect locations with given coordinates that form the route.

The returned route can be downloaded or saved to a file in GPX format.

Recommendations

What is the best PHP vehicle tracking system class?
Getting distance to calculate fuel used and cost from map

Picture of Stefan Kientzler
  Performance   Level  
Name: Stefan Kientzler <contact>
Classes: 13 packages by
Country: Germany Germany
Innovation award
Innovation award
Nominee: 7x

Winner: 5x

  Files folder image Files  
File Role Description
Files folder imagelib (1 directory)
Accessible without login Plain text file ExampleRoute.gpx Output Example GPX output for calculated route
Accessible without login Plain text file ExampleRoute.txt Output excample for calculated route
Accessible without login Plain text file OSMapOpenRouteTest.php Example script demonstrating usage

  Files folder image Files  /  lib  
File Role Description
Files folder imageOSMap (3 files)

  Files folder image Files  /  lib  /  OSMap  
File Role Description
  Plain text file OSMapOpenRoute.php Class main class of package
  Plain text file OSMapOpenRouteStep.php Class helper class
  Plain text file OSMapPoint.php Class helper class

Downloadosmroute-2020-03-29.zip 17KB
Downloadosmroute-2020-03-29.tar.gz 16KB
Install with ComposerInstall with Composer
Needed packages  
Class DownloadWhy it is needed Dependency
OpenStreetMap Nominatim PHP Class Download .zip .tar.gz to determine geolocations for Adresses Optional
 Version Control Unique User Downloads Download Rankings  
 0%
Total:133
This week:2
All time:9,099
This week:146Up

For more information send a message to info at phpclasses dot org.