1

I ran into a problem when using Google Places Autocomplete API (https://developers.google.com/maps/documentation/javascript/places-autocomplete)

I want to find town "Лиман, Астраханская область", but in Google Maps it saved with stress on letter 'a', like "Лима́н" (https://www.google.ru/maps/place/%D0%9B%D0%B8%D0%BC%D0%B0%CC%81%D0%BD,+%D0%90%D1%81%D1%82%D1%80%D0%B0%D1%85%D0%B0%D0%BD%D1%81%D0%BA%D0%B0%D1%8F+%D0%BE%D0%B1%D0%BB./@45.7829326,47.2090495,14z).

And when I type "Лиман" without stress, Autocomplete API doesn't find this town.

My request:

HttpResponse<JsonNode> response = Unirest.post("https://maps.googleapis.com/maps/api/place/autocomplete/json?")
            .header("accept", "application/json")
            .queryString("input", placeName)
            .queryString("key", GOOGLE_PLACES_API_KEY)
            .queryString("language", "ru")
            .queryString("location", "55,37")
            .queryString("types", "(cities)")
            .asJson();

How to avoid this problem? I want the API to return this town, if I don't type symbol 'а́'.

Thank you.

0 Answers0