NOTICE: help.openstreetmap.org 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 https://datawookie.netlify.com/blog/2017/09/building-a-local-osrm-instance/ 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

Kratz
21112
accept rate: 0%

edited 21 Oct '19, 19:04

andy%20mackey's gravatar image

andy mackey
13.2k87143285


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 ♦
30.9k44279412
accept rate: 18%

Follow this question

By Email:

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

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "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:

×63
×34

question asked: 21 Oct '19, 10:37

question was seen: 2,611 times

last updated: 21 Oct '19, 19:04

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