Paging on Google Places API returns status INVALID_REQUEST

It is documented, see the documentation By default, each Nearby Search or Text Search returns up to 20 establishment results per query; however, each search can return as many as 60 results, split across three pages. If your search will return more than 20, then the search response will include an additional value — next_page_token. … Read more

Google Place API – No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘null’ is therefore not allowed access [duplicate]

I got it working after finding answer by @sideshowbarker here: No ‘Access-Control-Allow-Origin’ header is present on the requested resource—when trying to get data from a REST API And then used this approach to get it working: const proxyurl = “https://cors-anywhere.herokuapp.com/”; const url = “https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=${latitude},${longitude}&radius=500&key=[API KEY]”; // site that doesn’t send Access-Control-* fetch(proxyurl + url) // … Read more

Request main road / curbside StreetView panoramas instead of back alleys from API

Use the directions service to get directions from the desired address to itself. Use that location instead of the geocoder result for the street view location. Use the geocoder result (hopefully a ROOFTOP accuracy result) for the place to look “at”. related question: Facing the targeted building with Google StreetView Examples: 325 S Peck Dr, … Read more

How to Implement PlaceAutocompleteFragment and PlaceAutocompleteActivity to get Place details

First of all need to API key and Enable Google Place API to search and get place details. Add your API key to your app manifest ,need to replacing YOUR_API_KEY with your own API key: <application> … <meta-data android:name=”com.google.android.geo.API_KEY” android:value=”YOUR_API_KEY”/> </application> 1) PlaceAutocompleteFragment Xml: <fragment android:id=”@+id/place_autocomplete_fragment” android:layout_width=”match_parent” android:layout_height=”wrap_content” android:name=”com.google.android.gms.location.places.ui.PlaceAutocompleteFragment” /> Java: PlaceAutocompleteFragment autocompleteFragment = (PlaceAutocompleteFragment) … Read more