MKMapView and routes?

33 views
Skip to first unread message

Fredrik Olsson

unread,
Feb 4, 2010, 4:06:50 PM2/4/10
to CocoaHeads Øresund
Hi all.

Is there any way to draw a route on a MKMapView? Sort of like how Maps
does it for driving directions, but form own custom list of
CALocations?

// Fredrik

Fredrik Olsson

unread,
Feb 4, 2010, 4:38:09 PM2/4/10
to Patrik, CocoaHeads Øresund
Marvelouse find, I will try and comment tomorrow.

// Fredrik Olsson

4 feb 2010 kl. 22.18 skrev Patrik <a.patrik...@gmail.com>:

> Hej Fredrik.
> Kanske kan det här vara till hjälp?
>
> "Drawing polyines or routes on a MKMapView (Using Map Kit on the
> iPhone)"
> http://spitzkoff.com/craig/?p=65
>
>
> Mvh
> Patrik

Fredrik Olsson

unread,
Feb 12, 2010, 1:21:11 PM2/12/10
to CocoaHeads Øresund
Hi.

I followed this link, and took his improved version of the code, it
works really well.

Download the source code for Res i Skåne v2.2 to see it in action (or
wait for Apple to approve):
http://www.peylow.se/resiskane.html

Some small drawbacks with the code as is, that I plan to improve:
* It uses CLLocation instances instead of CLLocationCoordinate2D for
route points. Quite an overhead.
* It do not work well with pinch-to-zoom, so routes are hidden will
pinching. Must be possible to fix.


// Fredrik


On 4 Feb, 22:38, Fredrik Olsson <pey...@gmail.com> wrote:
> Marvelouse find, I will try and comment tomorrow.
>
> // Fredrik Olsson
>

Reply all
Reply to author
Forward
0 new messages