Topic: How to search for locations in OSM

Hello.

I'm trying to use "OSMRequestExample", but I don't know how to use it.
Could you please give me a sample code to get the name and coordinates of a cafe in the screen area using OSM?
I would also like to know how to search for multiple conditions at the same time.

Re: How to search for locations in OSM

Hello.

Something like:

string requestData = String.Format("node({0},{1},{2},{3});way(bn)[{4}];(._;>;);out;",
    bottomRight.y.ToString(OnlineMapsUtils.numberFormat), 
    topLeft.x.ToString(OnlineMapsUtils.numberFormat), 
    topLeft.y.ToString(OnlineMapsUtils.numberFormat), 
    bottomRight.x.ToString(OnlineMapsUtils.numberFormat), 
    "'building'~'hotel'");

OnlineMapsOSMAPIQuery.Find(requestData).OnComplete += OnComplete;

To combine requests, you simply write two requests in the same string.

OSM Overpass QL has a rather difficult syntax.
Either you understand how it works, or use some other service.
Help with making QL requests (and any other things outside of Online Maps) is not included in the support.

A few links that might be useful to you:
https://wiki.openstreetmap.org/wiki/Ove … uage_Guide
https://wiki.openstreetmap.org/wiki/Map_features
http://overpass-turbo.eu/

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: How to search for locations in OSM

I realized that I needed to learn more about OSM. Thank you.