README 2.27 KB
This is a slippy map for the iPhone written by Joseph Gentle.

It has been made as part of the CatchMe project.

We released it for you under the BSD license.

---------
For Users
---------
Once this application has more functionality than google maps, I'll throw it on the itunes store for free.

--------------
For developers
--------------

- Don't be frightened by so many source code files! Most of them (144 of the ~160 source code files) are from the Proj4 library. Proj4 is available here:
http://trac.osgeo.org/proj/
The only thing proj4 is used for here is converting Longitude / lattitude coordinates into Mercator coordinates (and back again).


Coordinate Systems
------------------

- This project uses 4 different coordinate systems! The code won't make any sense unless you understand them:

Longitude / Lattitude
- Points around the spherical earth measured in Degrees.
- Using the types provided by CoreLocation - CLLocationCoordinate2D { double lat, long; }

Mercator coordinates
- These are points on a flat square. The units are metres; though they're only accurate near the equator.
- Using types in Mercator.h - MercatorPoint { double x, y; } and MercatorRect.
http://en.wikipedia.org/wiki/Mercator_projection

Tile coordinates
- Each zoom level (z) has a grid of 2^z x 2^z tiles. Using OpenStreetMaps each of these tiles is 256 pixels per side.
- Each tile is indexed by the Tile struct - { int x, y, zoom; }. There are also TilePoint and TileRect structs for discussing regions of tiles complete with offsets into the tiles.

Screen Coordinates
- These are measured in pixels within the bounds of the MapView.
- Using builtin CGPoint, CGSize and CGRect

You can convert:
lat/long <-> Mercator using: [Mercator toLatLong: (MercatorPoint) coordinate] and [Mercator toMercator: (CLLocationCoordinate2D) coordinate]
Mercator <-> Tile using FractalTileProjection
Tile <-> Screen coordinates using ScreenProjection

Always be aware of what coordinate system you're working in / with and the code is all pretty easy.


Desired Features
----------------

Search
Bookmarked locations
Overlays (Of course, these can just be done with cocoa at the moment)
Remember last location
Disk cache
A Geo tracing facility would be nice... though I'm not too sure how the user can get the geotraces back off the device.