PHP Classes

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: 233 All time: 8,079 This week: 115Up
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 is available for providing paid consulting. Contact Stefan Kientzler .
Classes: 18 packages by
Country: Germany Germany
Age: 55
All time rank: 79050 in Germany Germany
Week rank: 16 Up1 in Germany Germany Up
Innovation award
Innovation award
Nominee: 11x

Winner: 6x

  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
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:233
This week:0
All time:8,079
This week:115Up