Getting street names in iOS - ios

I need to offer users a way to type an address in an UITextField with an autocompletion functionality as user is introducing the text. I've been looking for the best way to implement this, but I'm still not sure: is it possible to get a list of street names for a certain city? Or should I being provided such information in another and custom way (service request, a file with that information...)?
My application is for iOS 7+
Thanks

You can do this by using Google Places autocomplete API.This api provide you addreess that you want in list.
For More info please refer this example that help you to how to use Google Places autocomplete with your application
https://maniacdev.com/2013/10/ios-completion-providing-search-with-autocompletion-and-map-marking-using-google-places
you can find sample code for the same on Github find Below link for this
https://github.com/chenyuan/SPGooglePlacesAutocomplete
Hope this may help you.

Related

Get Popular Locations close by - Google Maps/Places SDK for iOS

I'm investigating how and if there is a way to get a list of popular locations near you (or within an area) using the Google Maps/Places API. Please see the attached screenshot for what I am referring to:
You'll notice the "Popular Locations in Toronto, On" section. Is there a way to get a list of these by passing in your current location, whether that be with coordinates or simply an address? I'm trying to understand how this was achieved in the above screenshot. Any help would be greatly appreciated. Thanks in advance!
You can use this web service api
https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=(latitude),(longitude)&radius=5000&key=(api_key)
to get all the nearby places. It also contains mechanisms to filter, keyword, etc.
You can check out this link https://developers.google.com/places/web-service/search to see a list of required and optional parameters that you can pass additionally.
In case you want to use native iOS sdk https://developers.google.com/places/ios-api/start this is a good place to start.

IOS - How to provide suggestions when inputting locations

How do you implement suggestions when a user starts typing in their city/location into an iOS app text field? For example, if you look at the yelp or maps app, when you start typing in a city it will provide suggestions based on what you start typing. Is there a way to do this, like somehow get a list of all the CLRegions in the CoreLocation framework, or some other way of implementing this?
Thanks for any help.
The best solution for this is to use someone else's (web-based) geocoding database - geocoding is a complex problem that you don't want to solve yourself :-). Geocoding is the act of taking a textual address and turning it into a latitude/longitude. Typeahead for geocoding is a helpful feature that requires fairly large databases that likely aren't suitable for mobile apps, thus my recommendation to use one of the web-based geocoding services for this.
Google's places API is probably a good candidate:
https://developers.google.com/places/documentation/autocomplete?csw=1
Check out this answer for some commentary from Google from 2011 when they first opened up that API in 2011:
Google Places API in iOS application

Using an EntryElement with AutoComplete features and Google Places API

Im wondering if you can help me with a problem:
Problem: Im trying to create a dialog with an EntryElement that allows a user to enter an address. As the user enters the address I would like to call the Google Places API to bring back a list of results to ensure the address is valid. The results should be displayed as a list of StyledStringElements which the user can select.
Does anyone have any advise on how to best achieve this?
Thanks and regards. Adam!
Answer can be found here:
Xamarin Forums

ios google api issue

I need to add a very common Google functionality to an iPhone app I am developing. The idea is that the user is presented with a TextBox where he can write an address (i.e.: "Amsterdam av)". The thing is that I want to add some "help" for him, se when he writes a street name, the app will show him a list of partial matches, like google Maps does here:
sample http://www.timotteo.com.ar/google.png
I canĀ“t find the exact class in the google API. It doesn't need to be as fast as google's own search, maybe the user can write "amst" and press a search button, to be presented with a list of partial matches. The API I'm looking for show return in some way a list with posibilities. All I could find for now where method that gives you the lat/long when you feed it with a specific address. Does somebody know what combination of methods/classes I should use? Maybe some example?
Txs in advance!
Perhaps you are looking for the autocomplete feature of the Places API:
https://developers.google.com/maps/documentation/javascript/places#places_autocomplete
This won't autocomplete for all addresses or streets, but rather for businesses, notable landmarks, etc.
If you want autocomplete for street addresses, I do not believe that is available through any documented APIs. That doesn't mean workarounds don't exist, but they may depend on more details about your use case. (For example, if you only care about a narrow geographic area, it may be possible to simply have a list of all the streets in your own database and handle the AJAX call yourself.)
Actully what I was looking for is this:
http://maps.google.com/maps/geo?q=amsterdam%201543&output=xml&oe=utf8&sensor=true&hl=es&gl=ar
That URL returns and XML with all the autocomplete options. All I have to do is parse that XML and voila! There I have my list.

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