OpenStreetMap Forum

The Free Wiki World Map

You are not logged in.


A fix has been applied to the login system for the forums - if you have trouble logging in please contact with both your forum username and your OpenStreetMap username so we can make sure your accounts are properly linked.

#1 2017-08-11 14:33:44

New Member
Registered: 2017-08-11
Posts: 1

How to query with tags to get specific places

Hi everyone, I'm new to OSM and I'm trying to figure out how to use it to create a web application that lets the user create a route with specified preferences.
Let's say user X wants to go from point A to point B, but for some reasons he wants to travel on a path where there are points of interest where "building=bakehouse", for example.
I couldn't find anything on how to do that, like if there's a way to query the DB to get all places (with their name, or latleng) within a range specified that have that tag, so I'm asking for help here.
Currently I'm using leaflet for the map, with AngularJS (I'm using Ionic framework).
Is there a way to achieve this and get a result containing the places with the specified characteristics?
Any tip, tutorial or guide will be really appreciated.


#2 2017-08-11 15:29:00

Registered: 2011-08-13
Posts: 1,120

Re: How to query with tags to get specific places

First you will need a provider to calculate the route between the 2 points. That's not part of Leaflet. Some providers make extensions for Leaflet to talk to their API and show the results.

I am not aware of any routing service that allows to to specify POIs you have to meet when you travel from A to B.
So you will probably first need to retrieve those POI yourself and then calculate some alternative routes along each of those POIs.


Board footer

Powered by FluxBB