I am developing an application for use in shopping malls. I want to use the augmented reality concept -- when some one is nearer to mall, then I calculate the distance to the mall by getting the current location. Then I display the mall name and distance to the mall on the image in a camera view.
How do I rotat开发者_开发问答e the image if someone is going in the wrong direction? Should I use the accelerometer? I don't know how. Should I correlate the data given by the accelerometer to the mall coordinates? If there is any other possible solution, let me know. Thanks in advance.
If you want the direction the device is pointing you need to use the compass, not the accelerometer
Take a look at CoreLocation, specifically the CLLocationManager and the CLHeading classes.
精彩评论