google-places-api

Is there a way to restrict the Google Places Autocomplete to search a city's streets?

£可爱£侵袭症+ 提交于 2019-12-03 02:44:19
Can I restrict the search to a city's streets when using the Google Places Autocomplete ? You can set the Autocomplete options to use geocode as the type, which will restrict the results that are returned to addresses: var input = document.getElementById( 'searchTextField' ); var options = { bounds: yourBounds, types: ['geocode'] }; autocomplete = new google.maps.places.Autocomplete( input, options ); There is no way to restrict the results to just streets, but this will largely achieve what you want. If you set yourBounds correctly, maybe limited to the area of a city, it will get you as

Google places API returning only 5 results

こ雲淡風輕ζ 提交于 2019-12-03 01:23:19
I am consuming Google places API, It returns only top 5 search results. Is there any way to increase the count . e.g. URL i searched for keyword "new" https://maps.googleapis.com/maps/api/place/autocomplete/json?input=new&types=%28regions%29&sensor=false&key=API_KEY Joel Fernandes From the documentation: A JSON response contains two root elements: "status" contains metadata on the request. See Status Codes below. "predictions" contains an array of places, with information about the place. The Places API returns up to 5 results . Source: https://developers.google.com/places/web-service

google-places bug in firefox browser

岁酱吖の 提交于 2019-12-03 00:05:14
问题 I use google-places-autocomplete for fill fields address (address ,city,country,postal code, latittude , longitude) .. it work well in all browsers but it doesen't work everytime in firefox browser (it may caused by the cache firefox browser) code js: function initializeAutocomplete(id) { var element = document.getElementById(id); if (element) { var autocomplete = new google.maps.places.Autocomplete(element, { types: ['geocode'], language : _mpop.current_lang }); if(id == "parent_personal

Android: Finding nearby places with Google Places API

一曲冷凌霜 提交于 2019-12-02 23:28:39
I am trying to get list of the nearby places using Google Places API. I have enabled requried API from Google Devloper Console and have an valid API key. I am able to get my corrent location. After I got the my current location I am trying to get nearby places list but it returns empty. I have also tried giving null PlaceFilter but it gives same result. private class MyGoogleMapOnMyLocationListener implements OnMyLocationChangeListener, ConnectionCallbacks, OnConnectionFailedListener { private GoogleApiClient mGoogleApiClient; @Override public void onMyLocationChange(Location location) { if (

difference between a nearby search and a text search in Google Places API

流过昼夜 提交于 2019-12-02 20:29:59
Whats the difference between a nearby Search and a text Search in Google Places API? For example, a nearby Search for cafe within a radius of 1km returns only 1 result using https://maps.googleapis.com/maps/api/place/ nearbysearch /json? location=-41.319282,174.818717 & radius=1000 & sensor=true & types=cafe & key=your_api_key while text Search for cafe within a radius of 1km returns 20 results using https://maps.googleapis.com/maps/api/place/ textsearch /json? location=-41.319282,174.818717 & radius=1000 & sensor=true & query=cafe & key=your_api_key . Changing types to type in the nearby

How to send a Google Places Search Request with Java

末鹿安然 提交于 2019-12-02 17:46:22
I need to search Goolge Places Pages by long/lat for any banks in the area of 20m. This Google Places Doc describes how to do it with JavaScript. They are using a google.maps.LatLng Object that i don't have in Java. Does anyone now how to call the Service? Maybe there is also an Java API for Goolge Places? Best Regards, Christian. Edit 1: I found someone constructing the url like this: String url = baseUrl + "location=" + lat + "," + lon + "&" + "radius=" + searchRadius + "&" + types + "&" + "sensor=true" + "&" + "key=" + googleAPIKey; Answer: Edit 2: I because of the post above i found out

Google Maps API - Radius search for markers using Places?

断了今生、忘了曾经 提交于 2019-12-02 17:21:37
I have set up a Google Map using API v3. The map has a number of markers with infoboxes attached. I am looking to set up a search box outside of the map for the user to input an address and then have the nearest markers returned based on the distance away (such as a radius search). From the API documentation I think I need to uses the Places services. Can anyone point me in the right direction? To do a radius search with the API, use the Geometry Library google.maps.geometry.spherical.computeDistanceBetween method to calculate the distance between each marker and the geocoded result from the

How to get all places (or specific type of place such as a restaurant) in a city or country with Google Places API?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-02 17:06:54
I am trying to find all "restaurants" or "insurance agencies" for example, in a city or country. Okay, maybe a country is too broad but mainly large cities. I am using the Google Places API and python but I see that you can only use a "radius" parameter or "rankby=distance". The problem is that, according to the docs, I believe that each query can only return 20 results on 3 pages, or 60 results (correct me if I am wrong). So if I wanted to find all the restaurants in New York for example, I would have to start at the center or something and set "rankby=distance" so that it would give me the

Limit Android Google Places API to search only given area

吃可爱长大的小学妹 提交于 2019-12-02 12:27:10
I`m using Android Google Places API to autocomplete streets and addresses. The problem is that it gives all streets from a whole country. Of course I added bounds to limit place for search, but it doesnt work correctly - it gives only priority, so in other words best results will be higher in list, nothing more So code: AutocompleteFilter typeFilter = new AutocompleteFilter.Builder() .setTypeFilter(AutocompleteFilter.TYPE_FILTER_ADDRESS) .setCountry("RU") .build(); Intent intent = new PlaceAutocomplete.IntentBuilder(PlaceAutocomplete.MODE_OVERLAY) .zzih(searchString) //that is for passing

Google Place Photo API returning 404

痞子三分冷 提交于 2019-12-02 12:13: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