小编toh*_*and的帖子

在ReactNative中调用RCTDeviceEventEmitter.emit时出错

我在ReactNative中更新...在我的设备中安装第一个项目之后显示以下错误:

调用RCTDeviceEventEmitter.emit时出错

问题是什么 ? 在此输入图像描述

android react-native

12
推荐指数
1
解决办法
5697
查看次数

通过setBoundsBias限制自动完成结果

我正在使用setBoundsBias来限制Google地图autocompletePlace中的自动完成结果,但是结果包含超出范围的地方。问题是什么 ?

{

final int PLACE_AUTOCOMPLETE_REQUEST_CODE = 1;

 AutocompleteFilter typeFilter = new AutocompleteFilter.Builder()
                        .setCountry("IR")
                        .build();
                try {
                    Intent intent =
                            new PlaceAutocomplete.IntentBuilder(PlaceAutocomplete.MODE_OVERLAY)
                                    .setBoundsBias(new LatLngBounds(new LatLng(38.051183, 46.211586),
                                                new LatLng(38.132784, 46.392860)))
                                    .setFilter(typeFilter)
                                    .build(MainActivity.this);
                    startActivityForResult(intent, PLACE_AUTOCOMPLETE_REQUEST_CODE);
                    overridePendingTransition(R.anim.fadein, R.anim.fadeout);

                } catch (GooglePlayServicesRepairableException | GooglePlayServicesNotAvailableException e) {
                    e.fillInStackTrace();
                }

}
Run Code Online (Sandbox Code Playgroud)

android google-maps google-places-api

5
推荐指数
1
解决办法
1501
查看次数