NOTICE: is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Hi, we have a php web app using Google Maps in the moment where you can check for the nearest shop from your location. Then the 10 nearest shops with driving time are offered. The area which has to be covered is about 100 x 400 km, there are about 100 users per day doing this request (so 1000 times a distance maxtrix has to be called).

I am just getting started with OSRM, so I have very basic questions:

  • Do I have to - or would it be better - to set up the map on our own (shared) server?
  • What capacity would I need for our task?
  • If yes, is there a way to do this just using php? I only came across this which needs access on Linux, which we don't have in the moment. I found an api on githup, but that seems untouched for many years.

So any basic tutorial on how to achieve the task would be very helpful!

asked 21 Oct '19, 10:37

Kratz's gravatar image

accept rate: 0%

edited 21 Oct '19, 19:04

andy%20mackey's gravatar image

andy mackey

Installing any routing software on your own server will require command-line access - you certainly won't be able to do it with just PHP.

You may find it easier to use a third-party provider. These include Graphhopper, Geofabrik, and Mapbox. Generally these will run OSRM, Graphhopper or Valhalla, which are all OSM-based routing engines. You can then simply call their API from your PHP script.

permanent link

answered 21 Oct '19, 13:31

Richard's gravatar image

Richard ♦
accept rate: 18%

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 21 Oct '19, 10:37

question was seen: 2,415 times

last updated: 21 Oct '19, 19:04

NOTICE: is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum