Simple, no frills ,get LAT/LON in iPhone - 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

Related

Showing a given location on a map in XCode (iPhone)

I am developing an app that will take in two locations from the user, one of which can be the standard 'current location', the second will be a location of the user's choosing. First of all, I simply want to plot these two locations on a map view.
Can anyone help me take a place name (e.g. Boston MA) from the user via a textfield and get the decimal coordinates as well as dropping a pin on the map?
Read the Location Awareness guide, especially chapter
UsingGeocoders
This will deliver a coordinate for given free text.
Further search in the Apple Developper Center for Demo code for that Geocoder.
Further there is a LocateMe demo code from Apple, which uses the map (MkMapKit)

iPhone, Open custom camera, take picture, save in UITableView with GPS info

Ok I need to open the camera, take a picture and save this in UITableView, also need to be saved the GPS info like date, place and how much km you are from the place that you take the image.
The image need to be saved in UITableView with the GPS info and every time that you take a new pic the process start again and is saving one after one in the same UITableView.
Many thanks.
First, welcome to stackoverflow.
Second, this isn't really a question, so I am going to "answer" this the best way possible. It seems like you are trying to just learn how to make an iPhone application, and this is your first stab at it.
I HIGHLY recommend checking out the stackoverflow FAQ first.
Next, check out Apple's Sample Apps and developer library for some help in getting started:
Sample Code
Getting Started
Photo Picker
Photos by Location
Lastly, as you are working through your code, if you stumble onto a problem, please return and as a more specific question.
Thanks,
Dan
The most important GPS info for photos are:
- time
- latitude
- longitude
Slightly advanced GPS info, still important for photos:
heading (v1)(or course) the direction in which you are going, driving; unfortunately when making a photo you have been stand still for some time, so there not always is a valid heading/course available.
heading (v2) the direction which the camera is looking while taking that photo: if GPS is not suitable, you also can use the compass orientation.
That 3 or 4 attributes, is usually stored into jpgs using an EXIF headers. If for some reason you cannot, or don't want to store that info into the picture then you have to store that values in an own file. A simple CSV file is sufficient.

iOS - How to show hints for gestures for iOS app?

I have seen some apps where when you launch them for the first time after downloading (e.g. Chrome app on iPhone), it shows you a list of animated gestures on the screen, kind of giving you a tour of the app.
How do I build one something like that? And how does the app know to launch only for the first time after download and not since then? For the second question, I am guessing a "shown=TRUE" value can be saved inside a PList file and checking the value each time when the app finished launching. But I am more curious about the mechanism involved in creating a guided app tour.
You can use transparent and semi-transparent images with a UIImageView, so you can make up an image with arrows and notes and put over the whole screen. You could fade it out when the user taps.
To know if it's the first time running the app, you should use NSUserDefaults instead of a plist; it's much easier, and you should be app to find a quick tutorial on that fairly easily.
Also, you could check around on this site for controls like this one. I haven't used any of them myself, so I'm not sure how much they differ from a regular UIImageView. They look nice though.

Is there a View Controller to show thumbnails like the Photos app?

I am looking to replicate the image gallery view that shows thumbnails, like in the photos app on the iPhone.
Is there a view controller or any examples that anyone can provide to replicate this?
There isn't one provided by Apple. I would recommend looking at Three20. It has a few things with look a lot like the Photos app.
Another option is AQGridView.
Take a look at the video of Session 104 from the WWDC 2010. It's basically a 40 minute tutorial on how to do the photo app.
Bear in mind that allowing users to zoom will greatly increase the space required. If you use CATiledLayers, that is, which, depending on your desired zoom level, you should consider doing.
Oh, and there is source code ;)
What they don't tell you is how they did their tiling. I found that you can
a) download ready-made tiles from the server with the app or with a content update (you can use ImageMagick's crop tileWidthXtileHeight - e.g. crop 100x100 - to do the tiling). This has the disadvantage of large downloads.
b) download ready-made tiles from the server as needed (may lead to lags in your app, but then MKMapView does it quite nicely, doesn't it?)
c) tile on the phone as needed (here you can also consider caching the results, although that will likely mean you have to check space left on the device)
I've recently given enormego's PhotoViewer a try. It's easy to use, and it's much more focused than the Three20 project. (Which I also use and like a lot.)

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