google-places-api

How to connect the text view to a website?

会有一股神秘感。 提交于 2019-12-01 13:02:23
问题 Hi i am new to android and i have created a app which uses the google places api and lists a few department stores. I have made the list clickable upon clicking the name of the department store i am starting a new activity which accesses a database that i created to give the recommended or discount products in that particular store. What i need is that when i click on the name of the department store i want the app to redirect to the stores website and list all the recommended or discount

PlaceAutocomplete Widget on MapView Fragment

岁酱吖の 提交于 2019-12-01 12:12:38
I am trying to create a mapview with a PlaceAutocomplete widget overlayed on it. The function of this view is to calculate the distance from my current location to the location I have chosen in the PlaceAutocomplete widget. To explain myself better, I need a similar fragment, as to the Google Maps app. For the time being I have created a fragment which displays the map. This view is then being overlayed by the PlaceAutocomplete widget. Currently, I am able to get my current location when I start the mapview. (screenshot 1) However when I try to search for a destination (screenshot 2), the

find Distance in kilometers in Android using google places Api

血红的双手。 提交于 2019-12-01 11:59:21
I want display the two places distance in kilometers for that I write the following code: hyd(17.38,78.48) eluru(16.7,81.1) private String getDistance(double lat1, double lat2, double lon1, double lon2) { double Radius = 6371; double dLat = Math.toRadians(lat2 - lat1); double dLon = Math.toRadians(lon2 - lon1); double a = Math.sin(dLat / 5) * Math.sin(dLat / 5) + Math.cos(Math.toRadians(lat1)) * Math.cos(Math.toRadians(lat2)) * Math.sin(dLon / 5) * Math.sin(dLon / 5); double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)); double km = Radius * c; String kms=Double.toString(km); return kms;

What is the proper way to use the radius parameter in the Google Places API?

▼魔方 西西 提交于 2019-12-01 11:45:56
I am using the Google Places API to retrieve all the POI (Places of Interest) around a the current location, it works ok but I have noticed that whatever the value of the radius is, I always get the same number of results (~ 20). As a result, if I give a radius that is too big, I don't necessarily get the nearest POI s. If I reduce the amount of the radius to be small enough, I will retrieve those nearest places again (from experimentation, I have noticed that 100 meters is a proper value) but that means that I will not get any POIs beyond 100 meters which is not quite what I want. My question

Google Places API cors

喜你入骨 提交于 2019-12-01 11:41:34
问题 I'm trying to do a get request from my localhost machine(And my app will stay on localhost) to get some information about a place. However, the Google Places API and/or my Chrome won't let me do this request due to CORS ( XMLHttpRequest cannot load https://maps.googleapis.com/maps/api/place/details/json?placeid=[placeid]&key=[key]. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access. ). Is there some way

Implement google location search in android app like OlaCabs

和自甴很熟 提交于 2019-12-01 11:10:34
I have implemented google location search like OlaCabs app but it is not as fast in searching as OlaCabs do.Reason behind it is I need to hit a rest api ( Google Place api ) to find locations as per text search. I noticed that in olacab app there is some text showing "powered by Google" (Look screen below).So I just want to know: 1.Is there any api provided by google for android rather than rest api ? 2.If OlaCaps using some paid google search API then what is it and form where can I buy it? You seem to be looking for Google Places Autocomplete API Most of Google APIs are free till some

find Distance in kilometers in Android using google places Api

牧云@^-^@ 提交于 2019-12-01 10:45:10
问题 I want display the two places distance in kilometers for that I write the following code: hyd(17.38,78.48) eluru(16.7,81.1) private String getDistance(double lat1, double lat2, double lon1, double lon2) { double Radius = 6371; double dLat = Math.toRadians(lat2 - lat1); double dLon = Math.toRadians(lon2 - lon1); double a = Math.sin(dLat / 5) * Math.sin(dLat / 5) + Math.cos(Math.toRadians(lat1)) * Math.cos(Math.toRadians(lat2)) * Math.sin(dLon / 5) * Math.sin(dLon / 5); double c = 2 * Math

PlaceAutocomplete Widget on MapView Fragment

倾然丶 夕夏残阳落幕 提交于 2019-12-01 10:10:01
问题 I am trying to create a mapview with a PlaceAutocomplete widget overlayed on it. The function of this view is to calculate the distance from my current location to the location I have chosen in the PlaceAutocomplete widget. To explain myself better, I need a similar fragment, as to the Google Maps app. For the time being I have created a fragment which displays the map. This view is then being overlayed by the PlaceAutocomplete widget. Currently, I am able to get my current location when I

ANDROID PLACE_PICKER (builder.build(context)

◇◆丶佛笑我妖孽 提交于 2019-12-01 09:56:37
问题 Basically I am trying to implement a PLACE_PICKER for Android and I am getting this confusing error here: int PLACE_PICKER_REQUEST = 1; PlacePicker.IntentBuilder builder = new PlacePicker.IntentBuilder(); Context context = getApplicationContext(); startActivityForResult(builder.build(context), PLACE_PICKER_REQUEST); The error is coming in line 4:" (builder.build(context), " and I have no idea why, I am getting this down below it as an error: Unhandled exception: com.google.android.gms.common

Google Places API vs Google Maps results

人走茶凉 提交于 2019-12-01 09:25:47
问题 I see some results on Google Maps but its not coming through Google Places API. https://maps.googleapis.com/maps/api/place/nearbysearch/json?key=my_api_key&sensor=false&radius=50000&location=40.338254%2C-74.585292&keyword=storybook+land whereas google maps shows Storybook Land, Black Horse Pike, Egg Harbor Township, NJ, United States Why this discrepancy? Is it not that Google Places API will show the exact results of Google Maps? I observed these kind of discrepancies in few other results