POIS hangs in example page openrouteservice.org/dev/#/api-docs/pois/post

This is in BBOX [[37.987815,-122.53684],[37.957815,-122.55684]]
and this is in GEOJSON “type”:“Point”,“coordinates”:[37.987815,-122.53684]

The test is in continual CALLING status on https://openrouteservice.org/dev/#/api-docs/pois/post


Hi @alanscot,

This might be an error due to wrong quotes being used. The ones you use are not valid in JSON.
You have also switched longitude and latitude.

Your body should look similar to this:


Still with that request there seems to be an error in the backend as nothing is returned.

There is currently no error catching for JSON validation here, that’s why the error only shows in the developer console :confused:

Can you paste the full body of the request you are trying?

Best regards

Thanks for your help .
I managed to get it to work with Javscript (outside of an webpage)

let request = new XMLHttpRequest();

request.open('POST', "https://api.openrouteservice.org/pois");

request.setRequestHeader('Accept', 'application/json, application/geo+json, application/gpx+xml, img/png; charset=utf-8');
request.setRequestHeader('Content-Type', 'application/json');
request.setRequestHeader('Authorization', 'xxx');

request.onreadystatechange = function () {
  if (this.readyState === 4) {
    console.log('Status:', this.status);
    console.log('Headers:', this.getAllResponseHeaders());
    console.log('Body:', this.responseText);

const body = '{"request":"pois","geometry":{"bbox":[[8.8034,53.0756],[8.7834,53.0456]],"geojson":{"type":"Point","coordinates":[8.8034,53.0756]},"buffer":200}}';



Tried coordinates for just north of San Francisco but tho I got a 200 there were no Points of Interest.
Is there any data for North America?

It’s really strange that it doesn’t return anything.
It works with either bbox or geojson but not with both.
Maybe just use one of them for now.


So I took out < “geojson”:{“type”:“Point”,“coordinates”:[37.997815,-122.53684]}, >
Thankyou so much !!!
It worked with Longitude preceding Latitude ! -122.53684 37.997815

But now AppInventor task “FeaturesFromGeoJSON” – trying to parse it – gives
ERROR 3411 Unable to parse GeoJSON content for the reason:
Value Body of type json.lang.String cannot be converted to JSONobject
and the same for “Value Headers”

Is the POIS data supposed to be GeoJSON ?

Yes the response is in GeoJSON
You can try pasting it in e.g. https://geojson.io.

It sounds like you are trying to parse the whole request object you get back.
Make sure you are only parsing the actual content (the FeatureCollection) of the response as geojson

Thanks again for your help.

I had to remove “Body:” from the beginning

And Woo Hoo ! it " worked " but I see no difference on the map.
I pasted into https://geojson.io/ and I did see a marker appear that I can click on.
I guess this POIS info is usable to selectively show “schools” or “place_of_worship” or “leisure_and_entertainment” etc…

This is what I’ve got:


{“type”: “FeatureCollection”, “bbox”:

[-122.558797, 37.956147, -122.534593, 37.999515], “features”:


{“type”: “Feature”, “geometry”: {“type”: “Point”, “coordinates”: [-122.539166, 37.973828]}, “properties”: {“osm_id”: 547597956, “osm_type”: 2, “distance”: 0.0, “category_ids”: {“601”: {“category_name”: " parking ", “category_group”: “transport”}}, “osm_tags”: {“null”: null}}},

{“type”: “Feature”, “geometry”: {“type”: “Point”, “coordinates”: [-122.534977, 37.967424]}, “properties”: {“osm_id”: 358775197, “osm_type”: 1, “distance”: 163.74816808, “category_ids”: {“156”: {“category_name”: “school”, “category_group”: “education”}}, “osm_tags”: {“name”: " Short School "}}},

{“type”: “Feature”, “geometry”: {“type”: “Point”, “coordinates”: [-122.554377, 37.960082]}, “properties”: {“osm_id”: 4451079994, “osm_type”: 1, “distance”: 0.0, “category_ids”: {“162”: {“category_name”: “bench”, “category_group”: “facilities”}}, “osm_tags”: {“null”: null}}},

{“type”: “Feature”, “geometry”: {“type”: “Point”, “coordinates”: [-122.558388, 37.962287]}, “properties”: {“osm_id”: 358832453, “osm_type”: 1, “distance”: 136.05182505, “category_ids”: {“135”: {“category_name”: “place_of_worship”, “category_group”: “arts_and_culture”}}, “osm_tags”: {“name”: " Saint Johns Episcopal Church"}}},

{“type”: “Feature”, “geometry”: {“type”: “Point”, “coordinates”: [-122.550409, 37.981898]}, “properties”: {“osm_id”: 544261443, “osm_type”: 2, “distance”: 0.0, “category_ids”: {“292”: {“category_name”: " swimming_pool ", “category_group”: “leisure_and_entertainment”}}, “osm_tags”: {“null”: null}}},

{“type”: “Feature”, “geometry”: {“type”: “Point”, “coordinates”: [-122.556174, 37.961475]}, “properties”: {“osm_id”: 358832618, “osm_type”: 1, “distance”: 0.0, “category_ids”: {“370”: {“category_name”: " post_office ", “category_group”: “public_places”}}, “osm_tags”: {“name”: “Ross Post Office”}}}




" Saint Johns Episcopal " and " Short School " show up on the map with or without the “FeatureCollection”.

Nothing extra or clickable gets added. I guess I need to figure out why APP Inventor is not adding markers.

What’s the significance of OSMs ?

Thanks again,