I have a Google Sheet with a column for location (city, state) and was wondering if there was anyway to implement Google Place API to make predictions based off user's input to autocomplete the city, state. If there is an alternative way to do this, that would be helpful too.
I suggest you create an in-cell dropdown list following the Google official documentation here
This is an example I did and can work for you.
Related
I want to put my book collection into a spreadsheet. Is there a way of having some columns autofill (e.g. with ISBN/ Dewey Decimal info) using some API?
I have managed to do things with Wordnik's API before and wondered if a similar thing is possible.
So if I put in title/ author, could the next cell autofill the rest? Or even get the whole book's info by just entering the ISBN?
Edit: I can access the API behind Worldcat and get this webpage: http://classify.oclc.org/classify2/Classify?title=outsider&author=camus&maxRecs=1
However, I can't seem to get a cell in Google Sheets to coerce the 'Author' and 'Title' of the book cleanly.
I've been running into some location based searches using the Google Maps API (more of a structural issue on my end than any criticism of the mapping api)
For example, if a user searches for "Victoria, Canada" it will bring up results for "Victoria, Canada" as expected. However, if a user searches for "Canada," google returns a longitude and latitude for the middle of the country, which is essential for correctly centering the map. However, it will not display any results since the nearest location is too far away from the location returned by google. I'm filtering out results that are about 20 miles away.
Can the Google Maps API return anything that I could use to tell if a user has entered a state or country name? If not, has anyone developed a work around solution?
Ideally, I would like to avoid just ordering the results by nearest location. I don't want items for "Spain" showing up at the bottom of a list when a user searches for "United States." I would try to determine if the query is a state or country prior to the search, but this seems very daunting task given the different possible spelling of country and region names. If I was only expecting english spellings, it would be a much easier approach.
Assuming this is a form on a site that has a controller parse the form and send the request to Google's API, you could break the form out into address, city, state, and country (if needed) form elements then make the address and city required fields.
I'm doing a similar approach with a site I'm building using Google Places API and it seems to work for me.
I've been using the Google Maps Places API to do search a map for the iPhone, like in the Maps app itself. I use a line like this:
https://maps.googleapis.com/maps/api/place/search/json?location=%f,%f&rankby=distance&name=%#&sensor=true&key=%#
using NSString to enter the missing information. However, unlike the Maps app, this search only works for local places and not for postcodes or other information. It would appear that if I want it to accept postcodes, I have to create a geocode request:
https://maps.googleapis.com/maps/api/geocode/json?address=W1A+1AA&sensor=true
But then of course, this doesn't search place information. Like the Maps app, I want my app to seamlessly return the best results of both.
Before I go ahead and code it so that it uses two separate APIs, is there a better way of doing this? Should I be using a different API that works more like the search in the Maps app?
I've looked into this for something like looking into a specific service, let's say sushi, at a zip code for those who don't want to use location services. Unfortunately, it seems like you have to make two calls, one for geocoding and the other through Google Places to get the locations that are within the radius of the coordinates given in the geocoding call.
See:
Find all parks for a given zipcode with google maps
and
https://groups.google.com/forum/?fromgroups#!msg/google-places-api/P3iDK5kO7OM/Cek4BzeXMA4J
As the question suggest, does the Google Custom Search API have function to return category (music, entertainment, news, gaming, etc) based on input keywords?
You can use Adwords Keyword Planner tool or display plannertool for getting related ideas of keywords.
Can any one help me in finding the city name in the map when I give zipcode through iPhone application.
As Deepak suggested, a Geocoding API is almost certainly the way to go. Google and Yahoo both provide good ones that can convert zipcodes into city names.
Here's a sample Google query for zipcode: http://maps.googleapis.com/maps/api/geocode/json?address=77048&sensor=true
And a sample Yahoo query for zipcode: http://where.yahooapis.com/geocode?q=77048&appid=0
I don't think there is any feature built-in that will help you find the city name like this. You can look at Geocoding options such a Google's Geocoding API but then you might need a bit more info than zip code.
Created a little native tool that looks up city, state, and lat/long without using the network connection. Has a rather large (1.9MB) SQLite database to pull from, so don't include this if you can just query Google or another online API.
https://github.com/ocrickard/OCZipLookup