Store locator for iOS using Google Maps - iphone

I am looking to add a "store locator" to a simple iOS application.
The ideal situation is the following...
A user will enter their zip code.
The map will display the store locations within a radius of that zip code
The locations will be stored a Google Places account (if easier, I don't mind if the locations are stored within the app code.)
Results can be displayed on a map or list view, or both. (no preference)
Does anyone know how to do this? Or of a tutorial that I can follow?
Ive searched around for a while and I cannot find a decent tutorial to get this done.
Thanks!

Here's how I would approach this:
1) Download your list of stores.
2) Ask them for the postal code/address and then geocode that to retrieve the longitude and latitude coordinates.
3) Display the long/lat on the map, as well as your stores. They can then see what is nearest to them.
4) Since you have the stores downloaded, preferably with a long/lat for each store, you can then calculate the distance away to the store and order them in an ascending fashion in the list, thus showing the closest ones first.

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

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

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.

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/

find nearest places in iPhone

Hello all iPhone developers,
I am developing an iPhone application.
In this application i want to find nearest places related to current CLLocation that I am getting from the iPhone device.
I have currently a database in different server .
I am accessing it via .NET web service.
In the database for testing purpose i have created some records with fields of latitude and longitude that I have taken from google maps.
Now ,My Question is that:
How can I determine that the location in the database is near by( within a range of kelometers) the current location ?
I have my options as below:
if
i have to get a address based and currentLocation.latitude and
currentLocation.longitude and pass it
to the service where i compare it
with the available address ( i have
read somewhere "geocoding").
else if
i can pass the latitude and longitude directly to the web-service
and do (what type of i want some
suggestion if any one knows) some
calculations there and give back the
nearest places data back to iPhone.
else
or this solution is completely
logical and if anyone have solution
reagrding it or a tutorial then it
will be useful.
It's true, there are a lot of reverse geocoding services out there (Google, Yahoo!, GeoNames, etc.) to convert from a lat/lon pair to a street address.
But if you have lat/lon pairs in your database already, then I don't think you ever need to convert to a street address. Calculating distances is much easier if all your points are represented by lat/lon, you can use the Haversine formula.
And in fact, if your database natively supports spatial types (for example, MS SQL 2008 appears to), then you can push that calculation into the database layer and not have to worry about it. That seems like the right approach to me: have your iPhone app send lat/lon to your web service and have the database calculate the nearest points-of-interest.