google-places-api

Google Places API in Android - API_KEY for individual users

假装没事ソ 提交于 2019-12-05 12:50:51
I have gone through the Android documentation and other blogs related to using the Places API in an Android application. Everywhere it suggests to use the API_KEY to call the REST service. The API_KEY being the same throughout the project/application. There is a limitation of 1000 requests per day. Now if my application is installed by many users, then the request limit will be easily exhausted if the same key is used by everyone. There would be some way to generate the API_KEY for individual user. But how can I take care of it in my code? You can have the quota raised to 100,000 requests a

How to set correct Lat and Lng based on current location

吃可爱长大的小学妹 提交于 2019-12-05 10:02:12
My goal is to do autocomplete prediction using Google Places API, and now I want to make some kind algorithm that will take current location lat and lng, and make a prediction of places only in 100-200 km diameter. So, at this moment I get user's current location lat and lng, how to set 100-200 km? private void getCurrentLocation() { mLastLocation = LocationServices.FusedLocationApi .getLastLocation(mGoogleApiClient); if (mLastLocation != null) { double latitude = mLastLocation.getLatitude(); double longitude = mLastLocation.getLongitude(); mLatLonBounds = new LatLngBounds(new LatLng(latitude

Getting “The provided API key is expired.” error on using Places API

感情迁移 提交于 2019-12-05 08:33:34
问题 I have generated Server key from Google console for Places API key. But whenever i am hitting the service i am getting " The provided API key is expired " error. I have tried regenerating the key but still got same error. 回答1: I have faced same issue... But finally got resolved. Google place services will take 10 minutes to make the services available for new API KEY created. Services will start working after 10 minutes, till then we get error as "The provided API key is expired." 回答2: You

Google Maps Places api, how do I get the standard infowindow content from a marker

我只是一个虾纸丫 提交于 2019-12-05 07:11:31
New to Google Maps, and not a script expert either. Thanks in advance for any help you can provide. I am putting a google map on a page of store locations. I have managed to get the map to display the marker I want for the store location using the search. Now I want the infoWindow to be populated to look like the standard google window. But using the code I was able to find on the places library, the results show up unformatted with no line breaks, and shows errors if a piece if information is missing, etc... I have searched and didn't find anything that helped - so please forgive me if this

Failed to load optimized model at path error with Google Maps API using Xcode 7 / iOS9

我只是一个虾纸丫 提交于 2019-12-05 07:03:22
I am trying to use the Google Places API autocomplete feature in my code. import UIKit import GoogleMaps class ViewController: UIViewController, GMSMapViewDelegate { var placesClient: GMSPlacesClient? override func viewDidLoad() { super.viewDidLoad() placesClient = GMSPlacesClient() let filter = GMSAutocompleteFilter() filter.type = GMSPlacesAutocompleteTypeFilter.City placesClient?.autocompleteQuery("Pizza", bounds: nil, filter: filter, callback: { (results, error: NSError?) -> Void in if let error = error { print("Autocomplete error \(error)") } for result in results! { if let result =

How to get data for menu and product listings from Google Places API?

馋奶兔 提交于 2019-12-05 06:43:52
On Google Maps, businesses can add product details or food items ("dishes") from a menu to their store or restaurant "place". How do we get this data? In the Google Place Api, Places details this information is not specified. 来源: https://stackoverflow.com/questions/52711117/how-to-get-data-for-menu-and-product-listings-from-google-places-api

Alternatives to Google Places API [closed]

喜欢而已 提交于 2019-12-05 06:34:36
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . What are alternatives to 'Google Places API' ? No matter if there is any paid API Service. 回答1: I also faced this issue when was searching a way to implement the autocompletion field for user input location field in iOS app. One of the best example of how it works I think was made in Apple's native Weather App.

From Google Maps CID to Place ID

*爱你&永不变心* 提交于 2019-12-05 06:30:47
I have a bunch of links to google maps in the form of https://maps.google.com/?cid=<identifier> . How can you go from that CID to a Place ID that can be used with the Google Places API? Is there any API endpoint that you can use to convert these URLs into the new places? Got lucky and found an undocumented api. If you have the CID, you can call the api like https://maps.googleapis.com/maps/api/place/details/json?cid=${CID}&key=YOUR_API_KEY . I just changed place_id=${the_end_val_i_needed} to cid=${CID} and in the json response is the place_id . You can use this API hidden parameter to get

Google places autocompletes API Android : bounds not working

六月ゝ 毕业季﹏ 提交于 2019-12-05 05:40:07
I'm defining my bounds as follow: private static final LatLngBounds BOUNDS_CHENNAI = new LatLngBounds( new LatLng(12.8339547, 80.0817007), new LatLng(13.2611661, 80.33632279999999)); // Chennai city bounds. Creating Goolge API client as follow: mGoogleApiClient = new GoogleApiClient.Builder(this) .enableAutoManage(this,this) .addApi(Places.GEO_DATA_API) .addConnectionCallbacks(this) .build(); And using those bounds in adapter as follow: PendingResult<AutocompletePredictionBuffer> results = Places.GeoDataApi .getAutocompletePredictions(mGoogleApiClient, constraint.toString(), mBounds,

How to extract street, city, etc. from GMSPlace Address Components

☆樱花仙子☆ 提交于 2019-12-05 03:08:57
I'm using Google Places API for iOS and can successfully retrieve nearby places and present the address as a string. What I'm trying to do is extract address components such as city to store in a database. The documentation indicates a GMSPlace has an addressComponents property (an array), but I can't seem to figure how to use this property. The code below provides sets the entire address to the text of a label, but I can't get beyond that: Edit ---- added code that shows how I'm trying to access Address Components venueLabel.isHidden = false venueLabel.text = selectedPlace?.name addressLabel