google-places

Google Places API Alternative

回眸只為那壹抹淺笑 提交于 2021-02-19 08:05:05
问题 My IOS app (Swift 5) HEAVILY relies on googles places API specifically the Places Autocomplete. I'm using it to get addresses and places to show on the map for users. Is there an alternative for this now that they have stopped supporting it or is there a way to fetch autocompleted places using a string. ANY help is greatly appreciated. It's essential for my app to continue working. 回答1: Google has not stopped supporting Places Autocomplete. You can migrate to the new Places SDK for IOS

NotLoadingAPIFromGoogleMapsError even when loading correct URL

房东的猫 提交于 2021-02-07 17:10:53
问题 I am getting the NotLoadingAPIFromGoogleMapsError error for some users even if the correct URL is being used: (pug syntax): script(type='text/javascript' src='https://maps.googleapis.com/maps/api/js?key=MY_KEY&libraries=places') It seems to be resulting from the Authentication API call generated from the script. Anyone else have this issue? How did you solve it? 回答1: Hopefully others will find this useful - I received an answer from Google as follows: The API session token expires if someone

How to share data from one react native component to another component

这一生的挚爱 提交于 2021-02-02 09:59:41
问题 i have a component "Address" were i am using google-places-autocomplete for getting address.After that i extract the needed data (such as Country,postal code etc). And now i want to transfer this data into the "Main Component" for where the is getting called. In Address Component, i have used useState() to store data. import { View, StyleSheet, TextInput } from "react-native"; import { GooglePlacesAutocomplete } from "react-native-google-places-autocomplete"; import { } from "react-native";

Google places autocomplete suggestion without country name

走远了吗. 提交于 2021-01-27 11:25:26
问题 I am looking for a possibility to get suggestions without country name. I have the following js code: ... var autocomplete_pickup = new google.maps.places.Autocomplete(pickup_field, { types: ["address"], componentRestrictions: {country: "de"} }); ... The result is e.g. Bahnhofstrasse 4, Hamburg, Deutschland Now I want to have for that example only Bahnhofstrasse 4, Hamburg I have limited the countries only to Germany and therefore is not necessary to show the country name. Do you have an idea

Google places autocomplete suggestion without country name

雨燕双飞 提交于 2021-01-27 11:23:33
问题 I am looking for a possibility to get suggestions without country name. I have the following js code: ... var autocomplete_pickup = new google.maps.places.Autocomplete(pickup_field, { types: ["address"], componentRestrictions: {country: "de"} }); ... The result is e.g. Bahnhofstrasse 4, Hamburg, Deutschland Now I want to have for that example only Bahnhofstrasse 4, Hamburg I have limited the countries only to Germany and therefore is not necessary to show the country name. Do you have an idea

Restrict places autocomplete results to within COUNTRY and STATE

醉酒当歌 提交于 2020-07-03 16:21:38
问题 I'm currently using this URL to get my results restricted within Australia: https://maps.googleapis.com/maps/api/place/autocomplete/json?input=393&components=country:AUtypes=address&key=[my_api_key] But I'd like to say limit my searches to the current state let's say New South Wales. I tried this: https://maps.googleapis.com/maps/api/place/autocomplete/json?input=393&components=country:AU&state=NSW&types=address&key=[my_api_key] But it's returning the same number of results with items from

Android Google Places API - PlaceAutocompleteFragment clear button listener

99封情书 提交于 2020-05-25 04:51:05
问题 I am using Google Places API for Android - PlaceAutocompleteFragment API in my project to search locations, when user selects a location then get the records using location lat-long and display it to ListView. Now the problem is whenever user taps on clear button (X) of PlaceAutocompleteFragment I want clear ListView items for which I need to listen to clear button onClick? How to do that? Any help will be appreciated. autocompleteFragment.setOnPlaceSelectedListener(new PlaceSelectionListener

Failed to resolve: com.google.android.libraries.places:1.0.0:

左心房为你撑大大i 提交于 2020-02-23 11:28:26
问题 I want to use Google places API but I can't sync the project with "com.google.android.libraries.places:1.0.0:" dependency. How to add the places in my project?. 回答1: The library in documentation is wrong I guess, use this, it works. I had same issue few days back , gave a feedback to them on documentation they still didn't fix it. implementation 'com.google.android.libraries.places:places:2.1.0' You can see how to add places autocomplete over here Edit: Seems like they finally fixed the

how to get google places autocomplete to work if the textbox is initially hidden and should be shown only after a postback

筅森魡賤 提交于 2020-01-23 17:45:35
问题 I've got two textboxes for which I need to use google places autocomplete. These textboxes are contained in a panel which is hidden on page load. There is a list of options from which to select, and once that user input is obtained, the hidden panel should get shown. I've tried both Panel.visible = false; and Panel.Style["display"] = "none"; Panel.Style["visibility"] = "hidden"; But neither work. Once the panel is hidden the autocomplete for textboxes stop working. I cannot show the panel