本文介绍了为适用于Android的Place Autocomplete API创建场所类型过滤器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此API似乎还很新,因此这里没有很多问题,也没有太多教程.

This API seems to be fairly new so there aren't many questions about it here, nor many tutorials.

我遵循了Google的教程,并在我的应用程序中使用了自动完成Android api.我现在正尝试使用 AutocompleteFilter 将搜索结果限制在特定区域或特定类型的地点.

I followed Google's tutorial and got the Autocomplete Android api working in my app. I'm now trying to use the AutocompleteFilter to restrict my results to a certain region or certain types of places.

对于像我这样的初学者,几乎没有文档可以解释该怎么做.

There seems to be little to no documentation for a beginner like me explaining what to do.

AutocompleteFilter需要一个Collection对象.如何将以下值更改为整数?

The AutocompleteFilter requires a Collection object. How do I change the the following values into integers?

https://developers.google.com/places/supported_types#table3

推荐答案

问题已由我自己通过Google Maps for Work支持门户与之联系的Google员工解决.

Problem was solved by a Google employee himself whom I contacted via our Maps for Work support portal.

以下是所有地点类型及其对应整数的列表.

Here's a list of Place Types with their integer counterparts.

https://developers.google. com/android/reference/com/google/android/gms/location/places/Place

这些可用于过滤Android Place Autocomplete API.

These can be used to filter the Android Place Autocomplete API.

这篇关于为适用于Android的Place Autocomplete API创建场所类型过滤器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-01 07:04