How to get list of search results of location like in google maps - iphone

I am developing an application in which when the I enters an address ,I fetch latitude and longitude of that address and drop the pin.
But what I want is like I enter any business or address then a list of that search comes in google maps and multiple pins are dropped for that address.
I also want this feature to get include in my app but when I pass my address only one location comes not a list like it comes in google maps.
Please help me if anybody knows how google maps searches a couple of locations for that address
ex:- caribou coffee, chapel hil
Any suggestion will be highly appreciated
Thanks in advance!

This functionnality is provided by Google Places API.

If you are looking for an algorithm it's using the harvesine forumula or a quadtree data structure. A quadtree or a r-tree in maps applications most likely it uses a space-filling-curve to sort the quadtree. If you look for sfc I recommend a hilbert curve because it has better space fill quality but normally they uses a z-curve.

Related

Forms with maps feature that allows users to set their location

I am looking for a online app or code to embed that allows a user to set a certain location on a map.
What we need is a form in which a user inputs its name, address, email and his favorite location which can be a certain point in a town, a point of interest or an arbitrary place in the woods. We would like to see the map selection as well or the GPS coordinates of his selection.
We thought about Google Maps but did not figure a way to achieve this.
Do you have an idea how we can achieve this?
Thanks!
I found something that is usable:
Google Maps API Reverse Geocoding

reverse geocoding on the IPhone - getting exact street numbers

We are building a series of applications for the IPhone (IOS5), where we use reverse geocoding. Most of the time, CLGeocoder returns a range for the address number (eg. "someaddress 2-5"). We want to retrieve the exact street number for every reverse geocoding request.
As I have come to understand, this is not controlled by me as a developer but rather by Apple, which makes a call to Google and returns the results (the range of street numbers). Has anybody else encountered the same problem and found a solution?
One solution I was advised to do is purchase the google maps API for business. In its documentation it states that it offers "advanced geocoding", but no details are given for reverse geocoding and street numbers. Has anybody had any experience with this API?
Another thing that comes in mind is to use some third-party service that does reverse geocoding. But the thing I am not sure is if Apple will accept it. Does anybody has to suggest a third-party service that does reverse geocoding and returns the exact street number for a given position on the map?
Thank you in advance
It looks like GeoNames would fit your needs well.
From the Wikipedia page:
GeoNames is a geographical database available and accessible through
various Web services, under a Creative Commons attribution license.
I myself have been using CLGeocoder, and haven't experienced any issues with it returning a range of street numbers.

Providing address suggestions dynamically in iPhone app

In my iPhone application, I am looking for a way to provide auto-complete address suggestions using some free third party API's. The selections from these suggestions should be plotted on google maps.
The requirement is that these suggestion be dynamic so as soon as the user starts typing "Ca" I should provide suggestions like
California, US
Canada
Cafe
Calgary, Alberta, Canada
etc.
How can I achieve this? Any suggestions would be appreciated.
I have previously made a wrapper for the geonames.org geocoding service which lets you search for locations based on some wildcard or "fluffy" terms as you are looking for. This ILGeoNames wrapper contains a sample application which shows a searchbar with the results being dynamically shown in a table view as you type.
You should be able to extract the essential search mechanism from the code and provide these results on a mapview.
The ILGeoNames classes are available from GitHub.

Google Maps API: Requesting any place labels given longitude and latitude?

I am working on an iPhone map application and wanted to know whether it was possible to request any labels visible on Google Maps given a longitude/latitude and radius?
For example if I gave the following location to this Google Maps API, I would get back McCullough Hall, Moore Hall, etc. The list would be any place labels visible on the map (doesn't have to be just restaurants, businesses).
If this is possible can you direct me to where I can learn more about this. If this isn't possible, can you direct me towards another API where it is possible?
Look into Googles reverse geocoding, I think that's what you're looking for.
The short answer, you cannot!.
The only way is to search for places by name and get a reference key to query the place details including lat/lng. Not the other way around.
IMHO, this is mainly a policy of Google instead of being technical limitation.

Displaying nearby businesses in mapkit

Is it possible to display nearby businesses in mapkit? If not, how else can that be done?
Is there a way to display by category - restaurant, retail, museums?
Also, I don't think displaying traffic flow is available. Can anyone confirm?
The current version of MapKit does not support such features.
It's main capabilities currently are:
a scrollable/zoomable map
reverse geocoding (get the address for some given lat/long coordinates)
add annotations (pins) at a given lat/long
show phone's current location
show Standard, Satellite, or Hybrid view
To display nearby businesses, you would have to:
query a third-party for that information which would ideally return lat/long coordinates
add annotations to the map using the returned coordinates
This is an interesting and emerging business idea!
I live in Nordic region and there is an open Mashups especially for sweden.
By open i mean, any one can request and get access to the content to find nearby Cafe / WiFi / Sushi restaurants etc..
BEGIN PLUG WARNING
Check my iphone application which fetches content from the mashups and display using MapKit!
END PLUG WARNING
And there is a commercial content provider called Info24 for nordic countries at the moment.
Like DyingCactus said, it's not currently possible without using your own calls to one of the mapping service providers. There are options available, though.
One of them is CloudMade. They have a good iPhone library and support almost all of your requirements.
Check out the API at Cloudmade.com
I know this thread is kind of old, but i figured out a free alternative to do what you are looking for, more or less. You just nee to tap into a maps.google.com service and get a kml or JSON output. I used KML (XML) becuase i found the filesize to be consistently smaller. I wrote a 3 part series on my blog about how to do this for anyone that is interested.
http://www.zen-sign.com/finding-business-listings-and-displaying-with-mapkit-part-1/
http://www.zen-sign.com/finding-business-listings-and-displaying-with-mapkit-part-2/
http://www.zen-sign.com/finding-business-listings-and-displaying-with-mapkit-part-3/