iPhone map application not respecting spn - iphone

I am passing a link on the iPhone with google map instructions:
http://maps.google.com/?q=Cabelas&mrt=loc&sll=30.444064,-97.813874&spn=0.006313,0.01133
In a browser, this works great, centering the map in my area and bringing up the store near us. But on the iPhone, when the internal maps application intercepts the call, I get a view of the US, most of the params are being ignored.
Can anyone spot any reason for this, or have a reason?

See the Apple URL scheme reference for the rules for Maps links. Especially:
All parameters must be supported.
Since the mrt parameter is not supported, I suspect that one is the problem.

Related

why do both lyft and uber mobile web api's require latitude/longitude for destination

I have a mobile standalone web app. The app stores destination (aka dropoff) addresses for the user but getting lat/lon for those address is not only not easy but also hard to do at runtime. However, for both lyft and Uber, it is not enough to pass just the address in the dropoff. Apparently you also have to include the lat/lon query parms. It seems silly that I am calling a native app from my app (either uber or lyft), both of which allow the user to manually type in a dropoff address, yet it will not let my app pass in just the dropoff address and calculate the lat/lon internally as it does when a user manually types in the address.
anyway around this programmatically?
Pure speculation, but I'd imagine:
They don't want people using their APIs to geocode addresses
The address resolution is something most apps can achieve using other sources
Lat/Long is wholly unambiguous, whereas an address could have all manner of spelling / formatting issues for the API to have to resolve, increasing demand through subsequent requests.
The Apple Docs seem to indicate that geocoding is entirely possible natively, so it's just a little more work.
tl;dr
Uber/Lyft don't want their API abused for geocoding, and most platforms have a way of resolving an address into a lat/long pair, which provides exactness for the API to work with.

Apple iOS6 Maps - Destination Address > Business name showing instead of lat/long

I have an app that bumps the user out to Apple's maps to get directions to a business location, and I'm passing lat/long. Pretty simple, the URL I'm using is the following:
http://maps.apple.com/maps?daddr=lat,long
This of course works fine, but the client doesn't like the lat/long showing when the user gets to the maps, since it doesn't look very 'user friendly'. They would prefer the business name (which we have available) to actually show there. I informed them that this wouldn't work if we just passed in the business name alone, since Apple's maps may not know about that particular business' location.
However, they wanted to know if it was possible to somehow have it still show the business name in the destination-address, alongside the lat/long. Something like the following: "(Business Name) lat,long", where the business name is ultimately ignored and lat/long used. I've played around with this a bit with no luck.
Looking at Apple's documentation, I don't see of an obvious way of accomplishing this. Is this even possible? No worries if not, but just wanted to get some feedback. Thanks!
If you're writing an app, you could use MKMapItem instead of using the link URL method. With one of these, you can add a bunch of extra information, such as the business name and phone number, as well as the latitude/longitude. Then, you can open one in the Maps app by calling openInMapsWithLaunchOptions: on it.

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.

Adding pins for nearby places (e.g. pizzerias) in MapKit

MapKit doesn't natively support local search results, so I'm looking for a way to get a list of local pizzerias (or coffee shops, or a specific retailer) via some http api call.
The default google maps api requires javascript, so it's not clear to me how to integrate this into an iPhone app (without displaying a UIWebView).
I have found that a url in a format such as this:
http://maps.google.com/maps?output=json&q=pizza&near=37.3,-122&num=10
Does return a JSON-like list of results, but my usual friendly JSON parser, json-framework, barfs when it tries to parse this (even if I do clever-sounding things like leaving out the "while(1);" at the start of the reply). I'm also not sure how legitimate this URL is to use for this purpose.
I'm on the same quest. It seems that one option would be to perform the local search using Google's AJAX Search API, then plug that data into the mapkit.
That said, it's not entirely clear to me yet that this approach is in the clear vis a vis google's terms of service. Let's see here. Alright, changed my mind because of this. It's a post on google's own ajax api blog including video of a native iPhone app. Looks like this is the approved solution.

Perform reverse geolocation lookup

I'm pretty new to iPhone SDK and Cocoa development. I'd like to know how to call a web service which will take the lat and long values from my iPhone and feed them to a webservice so I can retrieve the City,State. I already have the phone location stuff squared away. I'm only looking for where I should pass this info to and how I can parse this data back into my app.
Essentially, I only want "City,State" to be visible in a label on one of my views.
The first time I tried this was with geonames.org and it put my returned lat/lng location in the middle of nowhere many many many miles from where I actually was. I tried the same lat/lng values with google maps api and it was in the right place. The only problem I've had is parsing the JSON data back into my app. The returned info seems to have multiple versions of the same info which I can't seem to understand how that works.
So once again. Just looking for a simple HTTP style string I can pass somewhere with my lat/lng values and it returns "City,State". If the example you mention involves parsing data. Please refer to an example I can dissect - I'm a noob.
Oh and one last thing, I know this was made possibly easier with the iPhone 3.0 SDK but I'm currently building this project on 2.2.1 - and for more than enough reason HAVE to do it this way until the rest of the app is ported to 3.0.
Look at the replies here and here