google-places-api

Google place api shows error in Android

牧云@^-^@ 提交于 2019-12-20 04:33:47
问题 I am facing a strange problem here. I want to query the google places webservice from my andorid app. For that I am always getting the error : "This service requires an API Key". How ever when I try to query it using my chrome browser and the server key, I get the response properly. In case of android, which key should I use as the android api key is giving me this error. Adding a package name is optional : Edit This is the request url : https://maps.googleapis.com/maps/api/place/nearbysearch

Google Places API Android resultCallback not firing

时光毁灭记忆、已成空白 提交于 2019-12-20 04:08:23
问题 I'm using the Google Places API for Android and I can't seem to get a resultCallback from a PendingResult to fire. Here's my code (essentially identical to the sample code to https://github.com/googlesamples/android-play-places/tree/master/PlaceComplete except in a Dialog) adapter = ((MainActivity) getActivity()).getAdapter(); googleApiClient = ((MainActivity) getActivity()).getGoogleApiClient(); final AutoCompleteTextView tvCity = new AutoCompleteTextView(getActivity()); tvCity.setAdapter

Google Places API Android resultCallback not firing

穿精又带淫゛_ 提交于 2019-12-20 04:07:26
问题 I'm using the Google Places API for Android and I can't seem to get a resultCallback from a PendingResult to fire. Here's my code (essentially identical to the sample code to https://github.com/googlesamples/android-play-places/tree/master/PlaceComplete except in a Dialog) adapter = ((MainActivity) getActivity()).getAdapter(); googleApiClient = ((MainActivity) getActivity()).getGoogleApiClient(); final AutoCompleteTextView tvCity = new AutoCompleteTextView(getActivity()); tvCity.setAdapter

Google Places API - how do I increase the free quota to 150,000 requests per day?

南笙酒味 提交于 2019-12-20 02:57:24
问题 In the Google Developers console, if I choose my API project there is a Quotas tab. Under Billing Status there is a 'Apply for a higher quota' link which links to a page that says.. "The Google Places API Web Service enforces a default limit of 1 000 requests per 24 hour period, which you can increase free of charge. If your app exceeds the limit, the app will start failing. Verify your identity to get up to 150 000 requests per 24 hour period, by enabling billing on the Google Developers

Is it possible to filter google place picker

*爱你&永不变心* 提交于 2019-12-20 02:47:11
问题 Is it possible to filter the locations google placepicker displays for lets say only supermarkets? Otherwise, how would i best go about creating a view like this? 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 =

Google Places API not returning any results for India

给你一囗甜甜゛ 提交于 2019-12-19 11:51:26
问题 https://maps.googleapis.com/maps/api/place/search/json?location=28.635704,77.224982&radius=50000&types=restaurant&language=en&name=&sensor=false&key=[key] I have been trying to find Google Places API 3 to get the list of restaurants in Delhi, but so far I have not got any luck. Has anyone tried that before. It shows good results with coordinates in US but nothing in Delhi? 回答1: I guess the problem is the categorization applied by the owners of the places. When I search for "restaurant delhi"

Getting JSON of Google Places Nearby Search

て烟熏妆下的殇ゞ 提交于 2019-12-19 11:49:41
问题 I'm trying to get the result json of a Nearby Search of Google Places API. I'm getting this error : "No Access-Control-Allow-Origin header is present on the requested resource." The code I'm using is : <html> <head> <title>Place searches</title> <script type="text/javascript" src="lib/jquery-2.1.1.min.js"></script> <script> var mJson = "http://maps.googleapis.com/maps/api/place/nearbysearch/json?location=-33.8670522,151.1957362&radius=500&types=food&name=cruise&key

PlaceAutocompleteFragment can't resolved

可紊 提交于 2019-12-19 08:52:35
问题 In my app I have added Google Maps and they work fine. I want to add a PlaceAutocompleteFragment. I am using the key which I had already generate for maps and I have enable the option Places Api from google.console. I have added these to my build.gradle: compile 'com.google.android.gms:play-services-maps:8.3.0' compile 'com.google.android.gms:play-services-location:8.3.0' compile 'com.google.android.gms:play-services:8.3.0' but when I try to use PlacesAutoCompleteFragment then Android Studio

GMSPlaceField Error when building - Swift 4.2

烈酒焚心 提交于 2019-12-19 08:30:35
问题 I have an app that's using Google's Place Autocomplete, so I've been following the example code that's been provided. I've added the GooglePlace pod to my podfile and since I'm using the same full-screen control, I'm using their sample code. No error shows until I try to build the project and when I do build, Im getting this error: "Use of undeclared type 'GMSPlaceField'" on line 29 回答1: Update you podfile.. error will be remove 来源: https://stackoverflow.com/questions/54586008/gmsplacefield

Google places autocomplete - location and radius not working

喜你入骨 提交于 2019-12-19 07:24:10
问题 Im trying to set the google places autocomplete to sort the results from the nearest to a point. I have a code like this... var defaultPlace = new google.maps.LatLng(49.227463, 16.546097); var optionsAuto = { location: defaultPlace, radius: 20000, types: ['geocode'], componentRestrictions: { country: 'cz' } }; var autocomplete = new google.maps.places.Autocomplete( inputStart, optionsAuto ); the types and componentRestrictions works great but the location and radius doesn't seems to be