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    
Last Updated Ratings Unique User Downloads Download Rankings
2020-03-29 (3 months ago) RSS 2.0 feedNot yet rated by the usersTotal: 100 This week: 2All time: 9,371 This week: 144Up
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

  Performance   Level  
Name: Stefan Kientzler is available for providing paid consulting. Contact Stefan Kientzler .
Classes: 10 packages by
Country: Germany Germany
Age: 52
All time rank: 2215139 in Germany Germany
Week rank: 20 Up1 in Germany Germany Up
Innovation award
Innovation award
Nominee: 5x

Winner: 3x

  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:100
This week:2
All time:9,371
This week:144Up

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