Algolia Places as Google Maps replacement

Hello,

I plan to use Open Street Map (OSM) as a Google Maps replacement in my webapp.

But their geocoding doesn’t work very well, for instance on http://www.openstreetmap.org/ looking for “27 rue du chemin ver” gives no result and “27 rue du chemin vert” first result is in Normandie whereas I’m in Paris.

So I would like to use Algolia Places (AP). But looks like some places are missing:

Google Maps API returns both address and place name:
{"address_components":[{"long_name":"Grande Voie des Vignes","short_name":"Grande Voie des Vignes","types":["route"]},{"long_name":"Châtenay-Malabry","short_name":"Châtenay-Malabry","types":["locality","political"]},{"long_name":"Hauts-de-Seine","short_name":"Hauts-de-Seine","types":["administrative_area_level_2","political"]},{"long_name":"Île-de-France","short_name":"Île-de-France","types":["administrative_area_level_1","political"]},{"long_name":"France","short_name":"FR","types":["country","political"]},{"long_name":"92290","short_name":"92290","types":["postal_code"]}],"adr_address":"<span class=\"street-address\">Grande Voie des Vignes</span>, <span class=\"postal-code\">92290</span> <span class=\"locality\">Châtenay-Malabry</span>, <span class=\"country-name\">France</span>","formatted_address":"Grande Voie des Vignes, 92290 Châtenay-Malabry, France","formatted_phone_number":"01 41 13 10 00","geometry":{"location":{"lat":48.7654688,"lng":2.2884930000000168},"viewport":{"south":48.76542199999999,"west":2.2881801999999425,"north":48.76548440000001,"east":2.289431400000012}},"icon":"https://maps.gstatic.com/mapfiles/place_api/icons/school-71.png","id":"ffe5900e9a9417b4661c1785aba4afd2348c6df6","international_phone_number":"+33 1 41 13 10 00","name":"École CentraleSupélec","photos":[],"place_id":"ChIJIQlfX0Z35kcRSYDJs8ZYcnc","rating":4.6,"reference":"CmRRAAAANrJXFhLsfceT8Fg_o-XtJqltwdn_k_WWmGfETOpoECqHouD0F_h6ELOASFF1h1L6W62tPLiLhVlGtgyEWn08BVXV7syiovHI53DPe7-6A_R-4gLGH170dqWOBuh6e1XLEhBabX5X-Qg5feQgSmlWuCehGhR70LLYddXkQ6lYHjSvqSnigzZJfQ","reviews":[],"scope":"GOOGLE","types":["university","point_of_interest","establishment"],"url":"https://maps.google.com/?cid=8607039448301535305","utc_offset":60,"vicinity":"Grande Voie des Vignes, Châtenay-Malabry","website":"http://www.ecp.fr/","html_attributions":[]}

=> address is Grande Voie des Vignes
=> place name is École CentraleSupélec

How may I get this kind of places?

Adding a type “place” and a field “name” in AP suggestions would be great!

1 Like

Hi @sylvain.fabre,
As it’s unfortunately the case with Google Maps, the OpenStreetMap dataset also misses places and locations, which reflects in the results returned by Algolia Places.

The good news is that using AlgoliaPlaces + autocomplete.js together, you can easily combine results from AlgoliaPlaces and results from any other Algolia index you’ll manage yourself. You can see in that example that users can search for addresses in addition to places to rent, but in your case you could create an index of places you’ve found missing (i.e Grande Voie des Vignes, and use it.
If you’re not familiar with autocomplete.js, feel free to look at the example shared, and at our step-by-step Autocomplete guide.

Note: You also have the possibility to report irrelevant results via a form available on the AlgoliaPlaces support page

1 Like

Hi @alex

Thank you for your quick feedback.

Actually OSM dataset includes “Ecole Centrale Paris” place: you can search for it (http://www.openstreetmap.org/search?query=ecole%20centrale%20paris) and get an entry (http://www.openstreetmap.org/way/27515423)
=> It’s only missing in Algolia Places

I forgot to mention that AlgoliaPlaces for now only returns the following types:
city, country, address, busStop, trainStation, townhall, airport (see doc)

So even if Ecole Centrale Paris is in OSM, you won’t be able to to find it on AlgoliaPlaces.
The best approach in that case to make it work is as I mentioned to create you own index in addition to the AlgoliaPlaces data.

Oh :cry: !

Do you know if you plan to add this feature in the near future?

Hi Sylvain,
It’s not something we have on our roadmap for the next coming months. That being said, I’d recommend you opening a github issue at https://github.com/algolia/places/issues, so other interested people can comment / upvote, and that way all together you can influence the roadmap.

Also, by the time we add those POI, feel free to use the approach shared in my previous post.

1 Like

@syl.fabre good news, it is now available! You can use directly the /reverse endpoint like this:

curl -X GET 'https://places-dsn.algolia.net/1/places/reverse?hitsPerPage=1&aroundLatLng=48.876599,2.124843'

See more info in the documentation: https://community.algolia.com/places/rest.html#reverse-geocoding

@raphael.daguenet good news! But I don’t understand how reverse geocoding can help me on this topic?

:thinking: good question, my bad, I read it too fast!