google-places-api

Google Places API can't found results

笑着哭i 提交于 2019-12-23 03:07:13
问题 Autocomplete feature about places stopped working in my android app. I have the below code AutocompleteFilter typeFilter = new AutocompleteFilter.Builder() .setCountry("GR") .setTypeFilter(AutocompleteFilter.TYPE_FILTER_REGIONS) .build(); Intent intent = new PlaceAutocomplete.IntentBuilder(PlaceAutocomplete.MODE_OVERLAY) .setFilter(typeFilter) .build(activity); activity.startActivityForResult(intent, 1009); Override protected void onActivityResult(int requestCode, int resultCode, Intent data)

PlaceFilter Place Type from Google Places API Android

爷,独闯天下 提交于 2019-12-23 00:53:30
问题 I want to ask how to get nearby Places with filter type (Example: shopping mall, bank) from new google places api (https://developers.google.com/places/android/start) Here my code (I already add some alternative in loop conditions), but I want to filter types from PlaceFilter not in loop conditions. PendingResult<PlaceLikelihoodBuffer> result = Places.PlaceDetectionApi .getCurrentPlace(mGoogleApiClient, null); result.setResultCallback(new ResultCallback<PlaceLikelihoodBuffer>() { @Override

The query limit on the Places API web service is different from the JS limit

久未见 提交于 2019-12-22 19:13:31
问题 I was developing an application which uses the places API through the Javascript Library (https://developers.google.com/maps/documentation/javascript/places), and although I was making hundreds of searches with it at any given time, I never seemed to go over the limit. I've decided to move the search aspect of my application to the server-side, though, because I was developing a mobile version and didn't want mobile browsers doing 100+ requests at a time. So, I switched to using the Web

How to change the default hint value of XML fragment element in Android layout

主宰稳场 提交于 2019-12-22 19:07:08
问题 Default hint value of the autocomplete widget is Search . How can this value be changed to a different String ? 回答1: Try out the below code: PlaceAutocompleteFragment places= (PlaceAutocompleteFragment)getFragmentManager().findFragmentById(R.id.place_autocomplete_fragment); EditText etPlace = (EditText)places.getView().findViewById(R.id.place_autocomplete_search_input); etPlace.setHint("Your Text"); Hope this helps. 来源: https://stackoverflow.com/questions/43505759/how-to-change-the-default

How to change the default hint value of XML fragment element in Android layout

烂漫一生 提交于 2019-12-22 19:02:31
问题 Default hint value of the autocomplete widget is Search . How can this value be changed to a different String ? 回答1: Try out the below code: PlaceAutocompleteFragment places= (PlaceAutocompleteFragment)getFragmentManager().findFragmentById(R.id.place_autocomplete_fragment); EditText etPlace = (EditText)places.getView().findViewById(R.id.place_autocomplete_search_input); etPlace.setHint("Your Text"); Hope this helps. 来源: https://stackoverflow.com/questions/43505759/how-to-change-the-default

Set marker icon on Google Maps v2 Android from URL

烂漫一生 提交于 2019-12-22 18:46:37
问题 I am unable to add the icon provided by the Google Places API to the marker. For example, I would like to have the icon returned from the JSON of Google Places API: "icon" : "http://maps.gstatic.com/mapfiles/place_api/icons/generic_business-71.png" Here's how I am doing it now without adding the icon: for (Place place : mNearPlaces.results) { LatLng placeLatLng = new LatLng(place.geometry.location.lat, map.addMarker(new MarkerOptions() .position(placeLatLng) .title(place.name)); } I looked at

PlacesService and the need of html node

雨燕双飞 提交于 2019-12-22 10:57:28
问题 <html> <head> <script src="http://maps.googleapis.com/maps/api/js?sensor=false&libraries=places&language=pt-PT" type="text/javascript"></script> <script type="text/javascript"> function initialize() { var request = { placeId: 'ChIJO_PkYRozGQ0R0DaQ5L3rAAQ' }; service = new google.maps.places.PlacesService(document.getElementById('places')); service.getDetails(request, callback); function callback(place, status) { if (status == google.maps.places.PlacesServiceStatus.OK) { console.log(place); }

What format does the Google Places Photos API return the image in?

北城以北 提交于 2019-12-22 10:48:12
问题 Have a look at this API: https://maps.googleapis.com/maps/api/place/photo?maxwidth=400&photoreference=CnRtAAAATLZNl354RwP_9UKbQ_5Psy40texXePv4oAlgP4qNEkdIrkyse7rPXYGd9D_Uj1rVsQdWT4oRz4QrYAJNpFX7rzqqMlZw2h2E2y5IKMUZ7ouD_SlcHxYq1yL4KbKUv3qtWgTK0A6QbGh87GB3sscrHRIQiG2RrmU_jF4tENr9wGS_YxoUSSDrYjWmrNfeEHSGSc3FyhNLlBU&key=AddYourOwnKeyHere When you invoke it using Postman, or in a browser, it returns an image which is rendered beautifully. Now, from inside an app, when I use $http or jQuery to call

Google Maps Address Components Geocoding vs Places API - Short vs Long Name

流过昼夜 提交于 2019-12-22 09:57:16
问题 Hey there GMaps API developers. To start - what an incredible product and service the Google Maps/JS API v3 is - thank you so much! Now, with that important bit of sincere gratitude out of the way... The short_name vs long_name options for address components is a nice feature, but for each service these two attributes mostly contain the same values, except geocode has what I would expect for short_name for both and places has what I would expect for long_name for both! *tears* Before Places

Google places autocomplete inside a react component

前提是你 提交于 2019-12-22 06:58:08
问题 I am trying to build a google map component and everything is working fine with the Google Maps API v3 but not the Autocomplete functionality. This is the code I am using: The Google Map component import React, {Component} from 'react'; import ReactDOM from 'react-dom'; const Marker = React.createClass({ componentDidMount: function() { console.log("Marker on mount"); }, render: function() { return false; } }); export default Marker; const GoogleMap = React.createClass({ componentDidMount: