Get Popular Locations close by - Google Maps/Places SDK for iOS - 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.

Related

Google Places iOS SDK: How to Get Point of Interest Based on Text Search

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!

Obtaining locations around user API?

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.

Getting street names in 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.

How to create get direction button in mapView?

I am working on my app, it has the mapView inside and the user location. Then, I need to get direction from user location to particular place on the map, how do I do that. I'am searching around and it seem to be like that Apple does not allow to do it on Apple map.
Please give me some advices and thanks so much.
As John commented, you can't get directions via a UIMapView, as Apple doesn't provide an API you can use to do so. If you really need an API for directions and don't want to write it yourself, check out the following APIs:
MapQuest
CloudMade
Google Directions Web API
Using one of the listed sources, you can make an HTTP request to a server that will return a result (likely in JSON) that includes both directions and an ETA.
For example, the following MapQuest API call will return a JSON item called distance, which contains the formatted distance (in miles) that the recommended route between Lancaster and York will take. Just remember to pass in your API key.
http://www.mapquestapi.com/directions/v1/route?key=YOUR_KEY_HERE&from=Lancaster,PA&to=York,PA&callback=renderNarrative
For further explanation, have a look at the MapQuest documentation.

Route Map Direction on Bing Maps in Windows Phone 7?

How to show the Route path from one place to another place using bingmaps in WP7?
i am having user starting latitude,longitude and destination latitude,longitude values...
Please tell me....any samples please let me know...
thanks in advance
It will depend on your needs and if you wish to customise your "Map".
There are two options available:
Use Bing Maps Direction Task - (very good, quick tutorial)
Use the Bing Maps control in your app - (you will need to sign up for a developer account, then follow the tutorials on how to call the various services to get route information based on start and end points and then finally show them on the map)
number 2 is more challenging, however will offer much greater levels of customisation

Resources