Google autocomplete Component Restriction iOS - ios

is there any equivalent of a component restriction for Google Places Autocomplete for iOS.
I have found a few wrappers that wrap around the webservice call but even those (wrappers) do not have the capability to filter by component Restriction in general it seems.
I'm looking for this to make sure the results are only for my country of interest.
http://goobbe.com/questions/8144956/google-places-autocomplete-api-country-restriction

It's not possible with the iOS SDK at the moment.
The filter parameter of autocompleteQuery allows you to filter by type (it's a GMSAutocompleteFilter object), but currently offers no other filters.
For now you'll have to use the webservice (or a wrapper for the webservice that includes support for component restrictions).

Related

Google Place Picker API Query for App-scoped Places?

I have recently been looking at the following link to add to my application. It is the Google Place Picker API. I also know how to add places to the list of places that the Place Picker API uses to query for so that my custom places can appear in Place Picker API. However, I want it so that the Place Picker API only queries for just the places that have been created only by my application, and not for any other places that the Google Places API provides. I have found that this example query, under the scope key, helps me find if the Place created was created via my app or by Google. I want it so that the Place Picker API queries only for the Places created by my app. Is there any way to do this? That would be much appreciated. Thanks!
It's not possible, sorry. Neither the iOS or Android Place Pickers have an option to do this.
In fact both the Android Place class and the iOS GMSPlace class lack the scope property, which only exists on the Places API web service today.
You'd have to build this yourself, e.g. by displaying a map and adding markers to it for your places, etc, rather than using the Place Picker widget from the Google Places API for iOS (or Android).

Getting closest place using google places api under iOS

It seems to me several things I can do using google places web service api, cannot be done using google places ios sdk.
What I want to achieve is just getting the closest pizzeria and its information like address and telephone number. I don't use maps.
I don't see in the iOS sdk a method or class to search places close a specific location with several conditions (like type=restaurant and keyword=pizza).
However I can do that using the web service directly, without an sdk, but of course requires more code.
Am I right? Is that normal? I mean, that the iOS version has not the same functionality than the webservice, while I guess it is just a wrapper of the web service.
Web service sdk:
https://developers.google.com/places/webservice/search
iOS sdk:
https://developers.google.com/places/ios/
Thanks.
Unfortunately Places API for iOS doesn't support "condition" likes types or keywords.
You can however implement autocomplete.
The autocomplete service in the Google Places API for iOS returns
place predictions in response to a text-based location search query.
The request includes a textual search string and optional filter
criteria. You can use this service to provide autocomplete
functionality as the user types, by returning places such as
businesses, addresses and points of interest.

Google Maps autocomplete Functionality from Apple Maps for Objective C?

I need to implement autocomplete Functionality for a City-Name Search in Objective C.
Basically at the Moment I would use the Google Maps autocomplete Functionality from here: https://developers.google.com/places/documentation/autocomplete
But I don't like displaying the powered by google - logo.
That's the reason why I'm asking here, is there a way to implement autocomplete Functionality using Apple Maps API or similar ?
Thanks for any advice
Check this out - Yahoo YQL console.
There you can put queries like this - it gives you all places starting with San:
select * from geo.places where text="San%"
The resulting JSON / XML can act as data source to what you are trying to display for autocomplete results.
As I can see they allow up to some number of free queries for non-commercial use, and beyond that they charge. You may check it out here and here.
If you dont want to implement it yourself, you can use this service called 'Autocomplete as a Service' which is specifically written for these purposes. You can access it here - www.aaas.io. It does support large datasets and you can apply filters as well. You just add your data and use the API URL in your autocomplete data source.
Disclaimer: I am founder of it. I will be happy to provide this service to you.

Is it possible to achieve string localization inside of a statically linked lib?

I am working on building an SDK which will be built out as a statically linked library that third party applications can then drop in to their applications. Inside of this SDK, I was looking to be able to perform some "localization." Basically, I would like for the code in my SDK to be able to access some ".string" files to perform some string lookup and language translation capabilities. Then I could propagate these strings outward to implementing App layers through my exposed API's. Is this even possible? I thought it was but now that I have actually been trying, I am seriously having doubts.
You can make specific API to make the localized strings to be fed into the static library. One way for achieving it is by defining a predefined key value pair for all your library strings and ask end user to provide a localized files if a new language needs to be supported.

Getting autocomplete googleMaps data into a Delphi combobox

I am doing a Delphi transport application interacting with GoogleMaps APi and i would like to propose all "near by" names coming from the autocomplete Google Maps API when i enter the starting adress of the direction.
All of this will be displayed in a TCombobox when would be changed on the OnChange propertie.
Is that possible ??? ever heard of it ???
Thanks a lot
Gwenael
There is a part of the Google Maps API called The Google Places Autocomplete API. You can send requests (in the examples part of the reference page there is also the example with bounds for your purpose) as you will type in your combo box (ideally after some short delay for typos corrections). As the result you can receive either JSON or XML format file. After you parse it, you will get the list of appropriate suggestions.
I'm not sure with the Google Maps API Key; if it's possible to use it in standalone application (and about the limitations) because I haven't implemented static part of the Google Maps yet.
My first thought (assuming an approach which is based on remote controlling the web interface) was: this can be solved using TWebBrowser and friends (IWebBrowser2, IHTMLElement etc.). See my answer on this question to get a feeling for this. You could use Embedded Web Browser from bsalsa for easy access to all the Internet Explorer functionality.
My second thought was: there might be a part in the official API for this. But this I don't know. If there is none then the above approach could be a (work-intensive) workaround.
Yes, it's possible.
I have written a free and open source component that implements the Google Place Autocomplete and Google Place Details API's:
https://carbonsoft.co.za/components/
or
https://github.com/RynoCoetzee/TRCGPlaceAutoCompleteCombo

Resources