google-places-api

Google place rank by distance

做~自己de王妃 提交于 2019-12-02 03:59:59
问题 What's wrong with this request? I cannot come up with this issue. https://maps.googleapis.com/maps/api/place/nearbysearch/json?rankby=distance&location=49.4456945,10.1120762&language=IT&sensor=true&key=my-api-key If I delete the rankby parameter and add radius, it works. PS: instead of my-api-key there is a valid api key, declared in the console. 回答1: As the documentation states under 'Optional parameters > rankby > distance', "One or more of keyword, name, or types is required." Add one or

Google Place Photo API returning 404

情到浓时终转凉″ 提交于 2019-12-02 03:54:31
Google Place Photo API is returning 404 for any photo reference I use. I'm sure I'm doing something wrong Nearby Google Request https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=12.9716,77.5946&radius=5000&keyword=arbor&key= {KEY} Photo Reference from Nearby Response: CmRZAAAAu3qofo2XYSX74WtaGYIZ6iMA97uXmuJscP6xOW371WVRPpJk5ZscaxSfEYCCVgXgDzGKRC7ajN0dQ2_sECQqlO8F3YNp38VTmLDJ6LB-qMyyrn__-dnquJR_H4EUegt6EhCmHKtr_TcE_1wIAI-4fuCGGhTu9TPV6X9vQ7SgF-npEOssGdzR2A Photo Request https://maps.googleapis.com/maps/api/place/photo?maxwidth=400&photoreference

OnPlaceSelectedListener of SupportPlaceAutocompleteFragment not fired

我怕爱的太早我们不能终老 提交于 2019-12-02 03:46:17
I'm having a problem with the OnPlaceSelectedListener method of a SupportPlaceAutocompleteFragment . My onViewCreated() method: @Override public void onViewCreated(View view, Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); // Initialise a new fragment inside of this one. mFragmentManager = getChildFragmentManager(); mSupportMapFragment = (SupportMapFragment) mFragmentManager.findFragmentByTag("mapFragment"); mSupportPlaceAutocompleteFragment = (SupportPlaceAutocompleteFragment) mFragmentManager.findFragmentByTag("autocompleteFragment"); // Never inflate fragments

place picker close immediately after activity start (google places api)

我的梦境 提交于 2019-12-02 03:38:52
i have created a simple program to use google maps api and google places api . the google maps api is used to place marker and get lat long and other basic functionality . the places api is triggered through a option in option bar on top right . the intent is triggered and then it immediately closed . with out returning any result or even letting me select a location . i have given my main class, build , manifest files below . please do tell any extra info required and suggest any solution . public class MainActivity extends AppCompatActivity implements GoogleApiClient.ConnectionCallbacks,

Google Places Photos .GetUrl is adding width and height to url

天大地大妈咪最大 提交于 2019-12-02 02:59:39
问题 I'm trying to get images from google places. All is working for details: reviews, address... but when I try to get photos, I get a 404. if(place.photos != null){ for(var i = 0; i < place.photos.length; i++){ var str = place.photos[i].getUrl({"maxWidth": 100, "maxHeight": 100}); var res = str.replace("w100-h100-p", "p"); self.pacPhotos.push({ id : res }); } }else { console.log("no photo"); } } This will return the list ok but the URL is formatted wrong. it comes out like this. " https://lh3

Google Places Photos .GetUrl is adding width and height to url

房东的猫 提交于 2019-12-02 01:15:02
I'm trying to get images from google places. All is working for details: reviews, address... but when I try to get photos, I get a 404. if(place.photos != null){ for(var i = 0; i < place.photos.length; i++){ var str = place.photos[i].getUrl({"maxWidth": 100, "maxHeight": 100}); var res = str.replace("w100-h100-p", "p"); self.pacPhotos.push({ id : res }); } }else { console.log("no photo"); } } This will return the list ok but the URL is formatted wrong. it comes out like this. " https://lh3.googleusercontent.com/w100-h100-p/AF1QipN3xzffYDPCyEIWnvAQGd3RwNs2C14sVlSqrrAh=k " What I gather it wants

Google place rank by distance

烈酒焚心 提交于 2019-12-02 00:35:23
What's wrong with this request? I cannot come up with this issue. https://maps.googleapis.com/maps/api/place/nearbysearch/json?rankby=distance&location=49.4456945,10.1120762&language=IT&sensor=true&key=my-api-key If I delete the rankby parameter and add radius, it works. PS: instead of my-api-key there is a valid api key, declared in the console. As the documentation states under 'Optional parameters > rankby > distance', "One or more of keyword, name, or types is required." Add one or more of those parameters to your request and the server will send an OK response. As pushbit say, If rankby

How to set language for Google Place Details result in android?

走远了吗. 提交于 2019-12-02 00:32:37
问题 I want to set the language in which the results of Google Places API will be presented. I want the result I could get using this url: https://maps.googleapis.com/maps/api/place/details/json?placeid=A_PLACE_ID&key=MY_EY&language=el In android I get place details like this: PendingResult<PlaceBuffer> placeResult = Places.GeoDataApi .getPlaceById(mGoogleApiClient, placeID); placeResult.setResultCallback(mUpdatePlaceDetailsCallback); I cannot find a way to set language for the results like above

How to set language for Google Place Details result in android?

匆匆过客 提交于 2019-12-01 22:46:05
I want to set the language in which the results of Google Places API will be presented. I want the result I could get using this url: https://maps.googleapis.com/maps/api/place/details/json?placeid=A_PLACE_ID&key=MY_EY&language=el In android I get place details like this: PendingResult<PlaceBuffer> placeResult = Places.GeoDataApi .getPlaceById(mGoogleApiClient, placeID); placeResult.setResultCallback(mUpdatePlaceDetailsCallback); I cannot find a way to set language for the results like above with "language=el". Unfortunately we can't set language on the Places API for Android. The best way to

REQUEST_DENIED in responce of Google Places API Request (sensor=true)

穿精又带淫゛_ 提交于 2019-12-01 21:46:49
问题 I am trying to get places around my location, using Google Places API. Following is the code, for hitting URL for places search. NSString *URL = [NSString stringWithFormat:@"https://maps.googleapis.com/maps/api/place/search/json?location=-33.8670522,151.1957362&radius=500&sensor=true&key=0dp-j3dkCU_YUb97RHcbL5shmRrJ5R2y4bYz1Vw"]; NSMutableURLRequest *request = [[NSMutableURLRequest alloc]initWithURL:[NSURL URLWithString:URL] cachePolicy: NSURLRequestReloadIgnoringLocalCacheData