iPhone MapKit - Go "Around the World"? - iphone

I have an App that is using MapKit. I am dropping pins and everything else, but when I zoom out to view the entire world, it does not let me go past the the middle of the Pacific Ocean. If I am viewing California and want to go to China, I have to scroll all the way East to view it.
Is there a setting that I need to turn on, or is this just the way it is?
I do note that this is how the actual Maps App works, so I might presume that this setting cannot be changed...

You are correct. It's just the way it is.

Related

Is GPS Spoofing possible in iOS sdk?

Is there any way in iOS to spoof the GPS location. I mean to say show user different coordinates not the real one ?
Thanks!
As far as i know gps gives you lat long and you show it on map.
What you can do is add your code in between to spoof obviously iam not talking about the default app. Look at heversine formula it will be helpfull
take care of water bodies and buildings you dont want to spoof the position of car in ocean iguess
the most easiest way to do that is make the map annotation you own,
you may look that this https://github.com/samvermette/SVPulsingAnnotationView
hide the original one & make a fake annotation view with any location you want

Simple, no frills ,get LAT/LON in iPhone

I just want to display the lat/lon on the screen of an iPhone.
I've read a half dozen examples, and everyone decides to do 3 other cool things at the same time and soon I am in over my head.
I would love a link to an example of plain vanilla (not kitchen sink like Apple's LocateMe) example of where I need to set up the CLLocation object, how do I turn it on, put lat/lon in a variable, and then turn it off.
Here is a link with how to build an app that does nothing but display your lat/long: Lat/Long Display App

Selecting a location with MapKit

Is there a best practice or common pattern for allowing users to select a precise location on a map using MapKit?
I've seen examples where a user can enter an address in a search box. But what about the case where a user doesn't know the exact address and wants to select a location from the map?
It's a bit more complex task than it seems.
Here is the guide how to detect single taps on a Web View.
I've used the same pattern to detect single taps on Map View but allowing zooming and dragging at the same time.
Hope it helps.
I would say that replicating the Maps application is close to a best practice for map applications.
You can test it for yourself; tap and hold somewhere on the map and a pin that you can move around by dragging will be dropped where you held your finger.
The Google Maps app seems to tackle what is a reasonable idea by touching the map by instead allowing you to drop a pin on the map; the SO post might help out.

iphone mapview current location

I'm able to show current location on mapview. It shows round blue color circle. When I click on the circle, it shows "Current Location".
I want to show users current location as green pin. on click of pin, i want to show "My Location" annotation. How to do it.
Please suggest me how to do it.
Doing so is a bad idea. The blue dot and associated animation is a convention that is adhered to by all MapKit apps. Your user might be moving too. A pin is associated with a fixed location. Someone holding a phone is not a fixed point.
Please really think about the MapKit standards and Apple HIG they are there to help your users understand and enjoy your app.

iPhone Direction Arrow?

I need to create an iPhone simple view that, based on the location of the user in the world, points the person to a never-changing Long/Lat location.
Is it possible to know this from the iPhone API?
Any examples?
This is possible on the current (3GS) iPhone, but not on earlier versions (which did not have a compass). The APIs that you'll need to use are in the CoreLocation.framework.
Search the app store for "mecca" and you'll turn up many, many applications that do exactly what you're asking about. You'll also find several applications that let you drop a pin anywhere on the map and have the app point you to it.
I've recently written code that does almost exactly what you describe.
Here's what you ned to do:
Calculate a heading from your current location to your target location. You should use "great circle" calculations, so they show a correct heading even when the destination is over the horizon. I found code (in Javascript) at this link to show me how to do this:
http://www.movable-type.co.uk/scripts/latlong.html
You want the section titled "bearing"
That code uses javascript library routines like "math.sin(x)" You can pretty much just delete the "math." part, and the trig functions work as is.
That will give you your bearing in radians.
You then need to get your compass heading (if on a 3Gs phone), convert it to radians, and use the compass heading to correct for the orientation of the phone. If you're running on a 3G, you can skip the compass heading and show the bearing based on North being at the top of the phone, and let the user orient their phone towards North themselves.
Duncan C