how to implement display searched location on Map using Voice Command in Xamarin Android
For this you can use Google places Autocomplete APi's, which will give a result based about on your queried place name, Once you got your place name over Voice command pass that to the places API, And also there are a lot of query params that you can pass with the api to increase the probability of the search place query
For that you use this to kick start Places API, this shows the implementation of the Google places Autocomplete API, And also please follow this discussion about the api
Here is the list of query params and structure
Hope this helps :)
Related
I'm developing a petrol price comparison app for my final year project in university (something similar to GasBuddy or PetrolPrices if you're living in the UK/US). I want to create an Android app that features an in-app map that's prepopulated with all the petrol stations in the country (Ireland).
I was going to use the Google Maps API for the in-app map and then add custom markers for all the petrol stations. I'm going to use Firebase as my database and wanted a section of it to be a list of all the petrol stations with their information such as; co-ordinates, opening times, petrol prices etc. I would use the Google Places API but I only want petrol stations to come up on the app without a user having to input a search query for them, which means the map will have to be pre-populated already.
Is there anyway that I can get all the co-ordinates of all the petrol stations listed on Google Maps to input into my database so I can prepopulate the in-app map with custom markers?
Thanks in advance
Note that Stack Overflow is not a free code writing service.You are expected to try to write the code yourself. After doing more research if you have a problem you can post what you've tried with a clear explanation of what isn't working and providing a Minimal,Complete, and Verifiable example.I suggest reading How to Ask a good question and the perfect one. Also, be sure to take the tour read this.
That said, you can use Places API - Nearby Search to achieve this. And by using the type filter and setting it to gas_station, you will get details of the place such as their coordinates. See this for the list of supported types.
IMPORTANT NOTE:
Be careful on what you store in your database. According to Google Maps Terms of service under 3.2.3 (a) No Scraping, customer will not: (i) pre-fetch, index, store, reshare, or rehost Google Maps Content outside the services
There is, however, some data that you can store/cache temporarily. See their service specific terms for more information on this.
I'm working on an Android Studio project using Firebase as my database. How am I going to filter the places using google GPS to obtain the nearest places from the user? For example, when the user clicks on the option "within 2km", the system will sort out the places within 2km from the users' current place. Thanks if anyone can provide me a guideline on this.
https://developers.google.com/places/web-service/autocomplete
In optional parameters you can use radius or strictbounds if you are using Place Autocomplete.
I am working with Google Places API.
My task is to type some name, example Amazon and it should return me the type of this place as Shop.
In short if I pass place name to some web service it should return me the type of that place.
I tried two solutions
1)Place Autocomplete
I don't want to use this, because It returns so many results
2)Google Place Details API
Here I need to pass place ID instead of place name.
So any one knows, How can I get Place details by passing it name to some web service.
Thank you
You have to use the combination of Google Places API and Places Autocomplete API.
Places Autocomplete API will provide AutocompletePrediction from there you can pick up the placeId that you will use with Google Places API to get the details of that place.
I know you said you don't want to use Google Autocomplete API but it can be configured to return a max number of results (default is 10 I think) and can be also configured to return certain types of places by adding AutocompleteFilter. This will limit the results and it will also return useful results for your case.
I'm coding an Android application and I'm trying to get and display a list of touristic attractions from a certain city using Google Places API for Android (i.e. Central Park, Times Square...). However I've been checking the docs from here: https://developers.google.com/places/android-api/signup and I haven't found anything similar for Android.
On the other hand, the Google API for web services: https://developers.google.com/places/web-service/intro does have that functionality I'm looking for but Google says strictly not to use this API in an Android app.
I wanted to know if is possible to use this web services API in an Android app, and what other alternatives are there for such functionality I want to implement.
Try this google places API url. You will get the point of interest/Attraction/Tourists places in (For Eg:) New York City. You have to use the CITY NAME with the keyword Point Of Interest
https://maps.googleapis.com/maps/api/place/textsearch/json?query=new+york+city+point+of+interest&language=en&key=API_KEY
These result have all the details of a place like categorization (Museum, Landmark, ...) a picture, a two - three line summary about it and rating.
more details
I'm trying to use the Google Maps API to find nearby food services, but I'm getting a response showing NO_RESULTS.
https://maps.googleapis.com/maps/api/place/search/json?location=13.06397,80.24311&radius=100&types=food&name=chennai&sensor=false&key=AIzaSyBJ9werm537_N57AQ2d5RUvOwxaK-7Ajio
What am I doing wrong?
At this time at least, it is best not to assume that Google Places has a lot of data for a location or that the data is finely categorized.
In the case of your query, I find that if I remove the types and name parameters, I get results:
https://maps.googleapis.com/maps/api/place/search/json?location=13.06397,80.24311&radius=100&sensor=false&key=AIzaSyBJ9werm537_N57AQ2d5RUvOwxaK-7Ajio