是否可以过滤谷歌地方选择器

时间:2015-06-11 12:04:18

标签: google-maps google-places-api

是否可以过滤google placepicker显示的位置,仅举几个超市? 否则,我最好如何创建这样的视图?

mGoogleApiClient = new GoogleApiClient
            .Builder(this)
            .addApi(Places.GEO_DATA_API)
            .addApi(Places.PLACE_DETECTION_API)
            .addConnectionCallbacks(this)
            .addOnConnectionFailedListener(this)
            .build();

 int PLACE_PICKER_REQUEST = 1;
        PlacePicker.IntentBuilder builder = new PlacePicker.IntentBuilder();
    try {
        Context context = getApplicationContext();
        startActivityForResult(builder.build(context), PLACE_PICKER_REQUEST);
    }
    catch (Exception e) {

    }

3 个答案:

答案 0 :(得分:5)

此功能目前无法使用。您可以按照这两个未解决的问题进行更新:

答案 1 :(得分:2)

据我所知,你不能。我尝试扩展PlacePicker类,我无法覆盖。 Place Picker API看起来是试探性的,希望Google将来会添加此功能。

答案 2 :(得分:-4)

您需要在地点搜索中添加地点类型,grocery_or_supermarket就是其中之一。

来源:https://developers.google.com/places/supported_types