google-places-api

how to add a text field with google places dynamically using ionic 4

半腔热情 提交于 2020-01-22 02:56:41
问题 I'm tying to use google-place-api autoComplete in my project, but it gives me an error: TypeError: Cannot read property 'getInputElement' of undefined .html <section [formGroupName]="i" *ngFor="let tech of form.controls.stations.controls; let i = index"> <ion-item-group> <ion-item-divider color="light">Station #{{ i + 1 }}</ion-item-divider> <ion-item> <ion-label position="floating">Technology name:</ion-label> <ion-input #autoStation type="text" maxlength="50" formControlName="name"></ion

How do I run google's new “places_compat_compatify.sh” compatibility script?

点点圈 提交于 2020-01-21 07:38:05
问题 I am trying to migrate to the new places SDK provided by google and they provided a compatibility script winch automates the process: https://developers.google.com/places/android-sdk/client-migration#compat-script But I think that, I am not running it the way I should, I am doing it from my terminal in Android Studio and when it runs it simply says "sed can't read file [file name] no such directory exist" I am writing the command with my project's directory. 回答1: I fixed it if anyone is

Google Places JavaScript Autocomplete: can I remove the country from the place name?

倾然丶 夕夏残阳落幕 提交于 2020-01-19 07:54:06
问题 I have the following jQuery code which works well with getting the city list for the selected country. var city; var place; $('#city').on('focus',function(){ input = this, options = { types: ['(cities)'], componentRestrictions: { country: $('#country option:selected').val() } }; city = new google.maps.places.Autocomplete(input, options); google.maps.event.addListener(city, 'place_changed', function() { place = city.getPlace(); $(input).val(place.address_components[0].long_name); }) })

Access results from google places api ios for auto completion

南笙酒味 提交于 2020-01-17 13:46:03
问题 I am using this method to get suggestions and i need to show them in tableview: - (void)placeAutocomplete:(NSString *)autoCompleteString { [self.autoCompleteSuggestionsList removeAllObjects]; GMSAutocompleteFilter *filter = [[GMSAutocompleteFilter alloc] init]; filter.type = kGMSPlacesAutocompleteTypeFilterCity; [_placesClient autocompleteQuery:(NSString *)autoCompleteString bounds:nil filter:filter callback:^(NSArray *results, NSError *error) { if (error != nil) { NSLog(@"Autocomplete error

Access results from google places api ios for auto completion

廉价感情. 提交于 2020-01-17 13:44:24
问题 I am using this method to get suggestions and i need to show them in tableview: - (void)placeAutocomplete:(NSString *)autoCompleteString { [self.autoCompleteSuggestionsList removeAllObjects]; GMSAutocompleteFilter *filter = [[GMSAutocompleteFilter alloc] init]; filter.type = kGMSPlacesAutocompleteTypeFilterCity; [_placesClient autocompleteQuery:(NSString *)autoCompleteString bounds:nil filter:filter callback:^(NSArray *results, NSError *error) { if (error != nil) { NSLog(@"Autocomplete error

Displaying formatted phone number from the google places api in a alert dialog on Android?

隐身守侯 提交于 2020-01-17 03:36:10
问题 I have been using this following tutorial regarding the Google Maps API and Google Places API. http://www.androidhive.info/2012/08/android-working-with-google-places-and-maps-tutorial/ It is very good. I have managed to display markers of nearby places on a map, and display different types of markers for different categories as well. However, I would also like to display the establishment's phone number in an alert dialog when the user clicks on one of my markers. For this, I am using a Place

NullPointerException trying to launch map fragment

喜夏-厌秋 提交于 2020-01-17 01:22:08
问题 This is the first time I have tried to do anything with play services and google maps/places API. I am getting a NPE error when trying to launch the activity. 06-10 09:15:45.704 19942-19942/com.rcd.mypr E/AndroidRuntime﹕ FATAL EXCEPTION: main Process: com.rcd.mypr, PID: 19942 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.rcd.mypr/com.rcd.mypr.BoxLocator.BoxLocator}: java.lang.NullPointerException at android.app.ActivityThread.performLaunchActivity(ActivityThread.java

Google search place api, places not found

徘徊边缘 提交于 2020-01-16 11:27:31
问题 Somes places are not found from google api, It used to return results before the last update but it does not anymore. examples : Pizza hut - france Domino's pizza - france In & out burger - los angeles etc.. https://maps.googleapis.com/maps/api/place/search/json?sensor=false&location=34.029900,-118.255463&radius=5000&key=API_KEY&name=In-N-Out%20Burger https://maps.googleapis.com/maps/api/place/search/json?sensor=false&location=48.847194,2.408152&radius=5000&key=API_KEY&name=Pizza%20Hut https:

Multiple Google api keys in manifest file (Android)

▼魔方 西西 提交于 2020-01-16 03:40:30
问题 I am trying to add two api keys i.e Google places api key and google maps api key. But I am not able to add both at same time to manifest file.How can I achieve the same.Any help would be appreciated. Thanks in advance. The error I am getting is Caused by: java.lang.RuntimeException: The API key can only be specified once. It is recommended that you use the meta-data tag with the name: com.google.android.geo.API_KEY in the element of AndroidManifest.xml I am including api keys like this <meta

Ho do i use google places to find a place in android

时光总嘲笑我的痴心妄想 提交于 2020-01-16 01:00:12
问题 Just now I've purchased Google API Key. I've find the exact place by using google Places. The most important thing is I've to find the place programmatically which means that When I open my application it will display the place in a textview. Also i want to find the nearest places. Can anyone please explain with a complete sample code (in java, not java script code) 回答1: You can use following code for Google places Api Here i have search airports but you can search your own places and when