Search Google POI (maps.google.com) - iphone

when you go to maps.google.com and search for "cupcakes" for example, you get the results displayed on a map, and on the left there is a list of results.
I want the user of my application (iPhone and Web) to be able to enter a search term, then it searches on google and provides a list (much like the list on the left in maps.google.com), the user can then select a location from the list.
The list would need to be in XML format or something similar that can be parsed on the iPhone. It needs to include the Name of the location, a description (if provided) and its address/coordinates.
Is this possible, and if so, how can it be done?

You'll probably want to use the Google AJAX Search APIs, which has a different set of terms from the Geocoder. The Geocoder is for taking an address and returning a lat/long, not for things like local search. Specifically, you'll want to use local search feature. Check out the section on "Flash and other Non-Javascript Environments" for info on how to access this though a RESTful interface (for the iPhone).

Google provides a number of map services where you can search for locations, etc. Especially their Geocoding API may be of interest. If you use their services you are however required to show these results on Google Maps.
An alternative to Google is to use one of the free GeoNames services. They have a more relaxed set of conditions.

Related

Building a City/Country Search box. Can Bing API support this?

I'm currently building a search box for a mobile app that can search for a Country/ State/ Country. I'm currently looking for APIs that can support this... An option for me would be the Google Places API but as much as possible I don't want to use Google for my project.
So before I import the Bing SDK into my project, I'm curious if anyone knows if this is possible with Bing API.
With Bing Maps you can use the location query API: https://learn.microsoft.com/en-us/bingmaps/rest-services/locations/find-a-location-by-query however, it will also find addresses if you pass them in. Generally though, if you type just a state or country, this API will return the expected result. You can add a bit of code to look through the results and filter them based on their entity type if required.
Since you tagged Azure Maps, you can use the Azure Maps address search API: https://learn.microsoft.com/en-us/rest/api/maps/search/get-search-address It has filtering parameters available that might be better suited for this scenario.

Availability of POIs in HERE WeGo app vs Here Entrypoint (Places Search API)

I'm looking for certain POIs using their confirmed coordinates but the Here entrypoint from Place Search API (/discover/here) doesn't provide all POIs which I could manually find in the HERE WeGo web-app.
At the beginning I thought maybe this is because the default categories are set to eat-drink, going-out and shopping? I have provided an additional parameter (cat) to my request with all the categories, but this gave me even more missing POIs.
Does anyone know why there is a such difference between the web-app and API service?
The here-wego app doesn't use the "discover/here" endpoint so this won't show you the same results. It uses "discover/search".
The discover/here entrypoint was designed for a different use case and its behavior is a bit odd. It was set up for "check-ins", so it isn't guaranteed to return everything in an area.
If you want to provide your users all of the POIs in an area, you should use the browse/ endpoint. I know that requires them to specify categories, but it's really the best choice.
Alternatively, depending on your use case, you can call discover/search the same way you called it by using the here-wego app (same query and search center).

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/

How does Urbanspoon display map?

I've looked at Google's map API, which is all javascript and terribly slow on the iPhone. I then tried using the link option available at maps.google.com. That is fast but I can't see having much control over it. It also displays a little search box at the top of the map. Google's API says you must use maps in a website, which the iPhone isn't. I'm not sure about licensing for maps.google.com.
Urbanspoon's scope option does everything I want with maps in regards to displaying nearby businesses based on your location. Given the limited set of tools available for Google maps without mapkit, I don't know how they are doing it. It looks as though they have somehow integrated with mapkit. Clicking an annotation shows the callout and another click pushes a new view with details from that pin. Any ideas how this can be done?
-- EDIT --
Just to be clear, mapkit doesn't display surrounding businesses. That's the crux of the problem and I'm not sure how Urbanspoon got past it.
You can also use the Google AJAX Search API: http://code.google.com/apis/ajaxsearch/
It's a Javascript library, but for Flash, and other Non-Javascript environments, the API exposes a raw RESTful interface that returns JSON encoded results.
And within this API, what you want is the 'Local Search' if you are looking for nearby businesses based on the location.
Urbanspoon probably gets the data for the locations of nearby businesses via some other method than the MapKit API.
Then its likely that they use the MapKit API to display custom MapKit Annotations at those locations.
If you are looking for a business data provider you could look into yelp's API.