草庐IT

places_popularity

全部标签

android - 如何为 Google Places API get AutocompletePrediction() 方法提供合理的默认范围?

我正在使用这个方法:Places.GeoDataApi.getAutocompletePredictions(googleApiClient,query,bounds,AutocompleteFilter.create(null))它需要一个包含东北和西南LatLng点的LatLntBounds对象作为查询的边界,但我不想提供任何对象。尝试了null,但是得到了一个空指针异常尝试过:LatLngsouthWest=newLatLng(85,-180);LatLngnorthEast=newLatLng(-85,180);LatLngBoundsbounds=newLatLngBound

android - 在没有 Google map 的情况下使用 Google places API 但在 OSM map 上显示所选结果

我们想在我们的android应用程序中使用GoogleMapsAPI和PlacesAutocompleteAPI。在使用之前,我们希望清楚您使用这些API的“使用条款”。我们检查了谷歌文档。但是我们仍然有一些查询如下:我们想使用2个全屏View。在第一个View中,将有一个搜索按钮所在的OpenStreetmap。如果用户单击该搜索按钮,将打开第二个View,其中将有一个搜索栏和显示搜索结果的空间。这里我们想使用PlacesAutocompleteAPI来搜索地点。这样我们将在此页面中添加“PoweredByGoogle”Logo。一旦选择了结果,用户将被重定向到第一个View(map

Android TextView : How to place text above specific position in line/Setting height for ReplacementScan subclass

我正在尝试在TextView中显示带有和弦的歌词。为此,我需要在正文的特定部分上方放置字母或符号。到目前为止,我的想法是像这样子类化ReplacementSpan:importandroid.graphics.Canvas;importandroid.graphics.Paint;importandroid.graphics.Paint.FontMetricsInt;importandroid.text.style.ReplacementSpan;publicclassChordSpanextendsReplacementSpan{Stringchord;publicChordSpan

android - Google Places Api Key 未经授权

我在android应用程序中使用googleplaces时出现此错误{"error_message":"ThisAPIprojectisnotauthorizedtousethisAPI.PleaseensurethatthisAPIisactivatedintheAPIsConsole:Learnmore:https://code.google.com/apis/console","html_attributions":[],"results":[],"status":"REQUEST_DENIED"}我尝试过使用Androidkey、浏览器key和服务器key,但这不起作用请帮助我

android - getPlaceDetectionClient(android.app.Activity, com.google.android.gms.location.places.PlacesOptions) 已弃用

安卓工作室3.1.4placeDetectionClient=Places.getPlaceDetectionClient(this,null);报错:getPlaceDetectionClient(android.app.Activity,com.google.android.gms.location.places.PlacesOptions)isdeprecated知道用什么代替吗?谢谢 最佳答案 你读过APIreference了吗??getPlaceDetectionClient(Contextcontext,PlacesOp

android - Google Places Autocomplete 插件无法在 Firefox android 中运行

我们在我们的网站上使用了谷歌的places-autocomplete插件。最近,我们收到了网站访问者的多起投诉,称此插件无法在Android版本的Firefox中运行。不过,它在桌面版Firefox中运行良好。这个问题可以简单的观察到前往地点自动完成示例here尝试在“输入位置”搜索输入中输入邮政编码您将观察到以下2个问题-Google自动完成功能应在您开始输入时显示建议邮政编码。但直到有人在5位邮政编码后键入space或,时才会出现。当建议确实出现时(在键入space或,之后),您不能选择第一个建议。当您点击它时,光标会移回搜索输入。但是,您可以正确选择第二个或第三个建议。问题#2对

android - Google Place API - 自动完成 - 如何获取邮政编码?

我如何强制GooglePlaceAPI的自动完成功能来完成带有邮政编码的textView?我试过使用这个链接:https://maps.googleapis.com/maps/api/place/autocomplete/json?input=20&types=postal_code&language=de&sensor=false&key=myKey获取以20开头的邮政编码,但它不起作用。我从服务器得到以下响应:{"predictions":[],"status":"INVALID_REQUEST"}我怎样才能让它发挥作用> 最佳答案

Android Place 自动完成 fragment : Unable to set text

Google最近更新了他们的PlacesSDKforandroid,所以现在我也在更新我的代码。我正在尝试使用AutocompleteSupportFragment来允许用户设置他们的地址。这是我的代码:mAddressEditText=(AutocompleteSupportFragment)getSupportFragmentManager().findFragmentById(R.id.address);mAddressEditText.setPlaceFields(Arrays.asList(Place.Field.ADDRESS,Place.Field.LAT_LNG));m

java - Android 应用程序中使用的服务器 Web 的 Google Places API KEY 请求被拒绝

我正在尝试从GooglePlaces的API中为Android应用程序获取信息。为此,我首先在我的Google帐户中启用了这个API。其次,我为浏览器创建了一个APIKEY。由于另一个API,我已经有一个APIKEY服务器。所以,在我的代码中,我已经用这两个key进行了测试,并且我总是得到相同的结果!!!{"error_message":"ThisservicerequiresanAPIkey.","html_attributions":[],"results":[],"status":"REQUEST_DENIED"}我用来调用电话的代码是......@Overrideprotect

android - 使用 Google Place API 获取当前位置

我正在编写一个应用程序,试图使用GooglePlaceAPI获取当前位置.但我收到以下错误日志:E/AndroidRuntime(20212):java.lang.IllegalArgumentException:GoogleApiClientisnotconfiguredtousetheAPIrequiredforthiscall.E/AndroidRuntime(20212):atcom.google.android.gms.common.internal.zzx.zzb(UnknownSource)E/AndroidRuntime(20212):atcom.google.andr