I have tried so many codes but none them is working with respect to coveting current location to text in search bar please let me know any thing that works for my requirement.
Related
I am coding one location based app, I am using UIMapview to display the map information.
I want to know how to update the map view's current focus location according to the ZIP code user may input.
Can any experts can share some ideas?
Thank you in advanced!
Finally, I found one solution by myself. I used the google map geocode api to do it.
Trigger one call of https://maps.googleapis.com/maps/api/geocode/json? with zip parameter, then it response one location to the center of zip area.
If you go to google.com and search "Attractions in London", in the result page on the first line you will see a list of Point of Interest (POI) with its name, photo, and description.
I want to get this list of POI on my iOS app, without having the user typing "Attractions in London"; I will pre-load this list as suggested places in London. I've read through the Google Places API for IOS here: https://developers.google.com/places/ios-api/start. But I could not find any sample to search by text.
The only way I found is by accessing the Google Place Web Service API here: https://developers.google.com/places/web-service/search and do the text search. Get the JSON result and map it to my custom google place object.
Does anybody has experience doing this using client-site API iOS SDK? Not sure if I missed anything in their guide, or it's not documented or Web Service API the only way..
Thanks in advance!
So, I am using the location manager to get the user location data in Swift 2.0 Xcode 7.
The app supports localization for few languages. I am using the location data to get the user city and country which is then sent to a server to display some info on the Map.
However, if the system language is set to anything other than english, location data is returned in that language, as a result the server is not able to recognise those values.
So, how do I get the placemark location data in english even if the system language is different ?
You cannot achieve this using CLGeocoder. Unfortunately, native forward/reverse geocoding on iOS has lots of limitations including inability to select output language. You can also check my question here to see some other problems that can arise!
Please have a look at the accepted answer to that question. After reading it I tried Google Maps Geocoding APIs and I can confirm these APIs work great! You can structure advanced queries and you can easily specify the desired output language.
Is there any API is available for searching nearest place from current location ? I know we can find via Google Place API/ Foursquare. and i have already worked on find pizza, bar cafe , bar like that, But my filter types is Running Rout OR Jogging Trace.
Please suggest me API name for same. OR is it possible to search same with Google Place API ?
Use this api for getting your current location around places and nearest all places results in this google api . you can add only your current location coordinates . see this api.
only replace %7C to |.
See This Google api for all nearest places
i hope this link useful for you .
The app that I am currently working on has to do this kind of features.
1.User input "Address" and then there will be autocomplete (suggestion for that address)
2. After user hits search button . The MKMapkit has to bring user to that 'Address' and zoom region to that
I can do the #1 by using Google Autocomplete API and using this module TRAutocompleteView
Now ,I'm trying to figure to do #2 feature. I thought I can use Address result from google API to convert into lat,long by CLPlacemark but I tested the concept with this module which use CLPlacemark to convert address string
SPGooglePlacesAutocomplete
I found out that 20-30% of the address string can't be convert using CLPlacemark .It happes to be "Location not found" .And that happens mostly when you search in foreign language (I tried Thai language "
Are any other option for me implement these 2 features ? My app will be like YELP which has to search some result within specific region . Or can I use another way to do the address suggestion beside Google Autocomplete API ?
Changing MapKit to Google Map SDK can be one of the solution.But I want that to be last choice because it might be expensive if I exceed the daily limit
Thanks in advance
Just as a FYI, it is against the Google Terms of Service to use the Google Places Autocomplete with a non Google Map.
This is an obvious side effect of getting an address from Google and then asking Apple's API to turn those addresses into coordinates. Google will give you an address based on the data it has and the formatting style it wants, these will not always directly translate into Apple's data and format. If you want it to be properly reliable you need to stick with one set of services, Google or Apple, or a third party. It might be expensive if you exceed the daily limit but wouldn't that mean you're selling lots of copies of your app and such is the cost of doing business.