Hi all,
In Facebook app, when adding a new post, the app show surrounding area name.
This way of sharing place is cool, since it's automatically, and users don't need to choose from a list of venue names like Instagram app.
What is a quick way to get the same result as Facebook app?
I've used similar things before through services like google maps api.
https://developers.google.com/maps/
You can pass them a lat and long and get various bits of info back.
I'm not sure if that is now a paid service though. It wasn't when I last used it but I think it changed.
There may be other similar services available.
A more specific page from Google maps api...
https://developers.google.com/maps/documentation/geocoding/#ReverseGeocoding
I found that iOS have a built-in api CLGeocoder, this is more convenient to use than Web API:
- (void)reverseGeocodeLocation:(CLLocation *)location completionHandler:(CLGeocodeCompletionHandler)completionHandler;
This return you CLPlacemark with places, and areas.
http://developer.apple.com/library/ios/#documentation/CoreLocation/Reference/CLPlacemark_class/Reference/Reference.html
Here's a detailed comparison of all the geolocation solutions - Foursquare, Facebook, Google etc etc - http://crschmidt.net/blog/archives/463/working-with-place-apis-aka-how-i-spent-my-spring-vacation/
But this is actually what you are looking for if you intend to use Facebook Graph APIs for "places" - https://developers.facebook.com/docs/tutorials/ios-sdk-tutorial/show-nearby-places/
Specifically step 3 (https://developers.facebook.com/docs/tutorials/ios-sdk-tutorial/show-nearby-places/#step3)
Now that you have the current location, use it with the
FBPlacePickerViewController object to show the place picker when the
user taps on the ''Where are you?'' menu option.
Related
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!
Using the web version of Google Maps, I can enter a general place, like a neighborhood, and it will show that neighborhood, with its borders directly highlighted. Like this:
I want to be able to do this using the iOS SDK. However, I cannot determine through the documentation how to load a location by means other than a Lat/Long. Does this require the use of the Places API to work? If so, how?
Once I am able to display this, I want to display the user's current location on the screen, but keep the frame locked to the neighborhood. Basically, it will indicate to the user when they have wandered outside the specified area.
The Google Maps Api does NOT return neighborhood boundaries. You will have to build your own API for that.
If you're interested in NYC neighborhoods - I would contact the owner of locality.nyc - he can provide you with an API for that.
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).
I'm attempting to retrieve locations around a user upon retrieving their current location. Is anyone familiar with which API's/Frameworks are best to accomplish this? I've tried Foursquare2 but it seems that half the locations don't return addresses. I need a better API to use, preferably one that will return addresses, and can't seem to find any others. I came across Google Places, but it appears to be in beta and not available unless I submit a form and wait. Is there a way to do this with Google Maps or the Facebook graph perhaps?
Depending on which device you use. For example if you want to retrieve location data from android use this api, for an ios device, use read the my location section in this doc. Hope this gives you some idea.
I am using Google Places API to pull a list of resturants, and I am displaying them on map. However, since Apple has switched there map services over from Google in iOS 6.0, I am now in violation of Google's terms of use, which states that you must display Google data on a Google map.
"If your application displays Places API data on a map, that map must be provided by Google."
https://developers.google.com/places/policies#terms_of_use
I obviously need to change the map, because I am not going to release an application that is in violation. Any thoughts or suggestions on what to do? Should I go Google Maps with a web view? Does apple have some sort of Google Places API alternative?
Edit:
Using Google Maps through a web view is a hassle, i'd like to find an alternative to that, although it would technically work.
I decided to use Google Maps JavaScript API. Although, it is a little more difficult to deal with, mainly the JavaScript through Objective-C, it is a solution. The map is displayed through a web view, and I use JavaScript to interact with the map.
https://developers.google.com/maps/documentation/javascript/tutorial#api_key
I will wait to accept this answer, to see if anyone else has any thoughts. I just wanted to post this, in case it helps someone else.
Edit:
Google recently released a Maps SDK for iOS, this is the better solution now.
https://developers.google.com/maps/documentation/ios/
I would try to directly contact Google, explaining the situation, and ask them for written permission to use Apple's maps. This is more a legal question than programming. One would think that Google is aware that you can no longer display their maps using Apple's API and that, even regardless of the map, they would want you to use their places, as doing so generates advertising revenue for them.
Agree with #Owen here - you could get permission to leave your app unchanged until some possible future date when you might have to change it, or could you definitely go to the effort of changing it now and then possibly have to change it again in the future for some other reason.
If you could get a 100% guarantee that you could change it once and never have to change it again then I'd say do it now, but nothing's certain.