<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Drawing polyines or routes on a MKMapView (as an MKAnnotationView) &#8211; Part 2</title>
	<atom:link href="http://spitzkoff.com/craig/?feed=rss2&#038;p=108" rel="self" type="application/rss+xml" />
	<link>http://spitzkoff.com/craig/?p=108</link>
	<description>Craig&#039;s blog about Life and Software Development</description>
	<lastBuildDate>Fri, 27 Aug 2010 16:21:27 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: McAndy</title>
		<link>http://spitzkoff.com/craig/?p=108&#038;cpage=2#comment-438</link>
		<dc:creator>McAndy</dc:creator>
		<pubDate>Thu, 26 Aug 2010 19:18:04 +0000</pubDate>
		<guid isPermaLink="false">http://spitzkoff.com/craig/?p=108#comment-438</guid>
		<description>I&#039;m completely new to this topic and here&#039;s my question: How do you download a route from google earth or google maps with longitudes and latitudes? - Is there a tool for that?</description>
		<content:encoded><![CDATA[<p>I&#8217;m completely new to this topic and here&#8217;s my question: How do you download a route from google earth or google maps with longitudes and latitudes? &#8211; Is there a tool for that?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jassi</title>
		<link>http://spitzkoff.com/craig/?p=108&#038;cpage=2#comment-436</link>
		<dc:creator>Jassi</dc:creator>
		<pubDate>Fri, 13 Aug 2010 07:34:20 +0000</pubDate>
		<guid isPermaLink="false">http://spitzkoff.com/craig/?p=108#comment-436</guid>
		<description>I am creating a line between two points on a map. The line is displayed but the problem is that whenever I am zooming the map , the app crashes. This happens in 8 GB iPhone and not on 16 GB. Is it a memory issue or what?

I am submitting a snippet of code along with.
Please help me.

drawImage.frame = [tileContainerView frame];
	drawImage.tag = 555;
	UIGraphicsBeginImageContext(tileContainerView.frame.size);
	CGContextSetLineCap(UIGraphicsGetCurrentContext(), kCGLineCapRound);
	//CGContextSetLineWidth(UIGraphicsGetCurrentContext(), 3.0);
	//CGContextSetRGBStrokeColor(UIGraphicsGetCurrentContext(), 1.0, 0.0, 0.0, 1.0);
	CGContextBeginPath(UIGraphicsGetCurrentContext());
	CGContextMoveToPoint(UIGraphicsGetCurrentContext(), mapXFrom,mapYFrom+22);
	CGContextAddLineToPoint(UIGraphicsGetCurrentContext(),(mapXFrom +mapXTo)/2,(mapYFrom+ mapYTo+22)/2);
	CGContextStrokePath(UIGraphicsGetCurrentContext());
	CGContextFlush(UIGraphicsGetCurrentContext());
	 
	drawImage.image = UIGraphicsGetImageFromCurrentImageContext();
	[self  addSubview:drawImage];
	[self setUserInteractionEnabled:TRUE];
	UIGraphicsEndImageContext();</description>
		<content:encoded><![CDATA[<p>I am creating a line between two points on a map. The line is displayed but the problem is that whenever I am zooming the map , the app crashes. This happens in 8 GB iPhone and not on 16 GB. Is it a memory issue or what?</p>
<p>I am submitting a snippet of code along with.<br />
Please help me.</p>
<p>drawImage.frame = [tileContainerView frame];<br />
	drawImage.tag = 555;<br />
	UIGraphicsBeginImageContext(tileContainerView.frame.size);<br />
	CGContextSetLineCap(UIGraphicsGetCurrentContext(), kCGLineCapRound);<br />
	//CGContextSetLineWidth(UIGraphicsGetCurrentContext(), 3.0);<br />
	//CGContextSetRGBStrokeColor(UIGraphicsGetCurrentContext(), 1.0, 0.0, 0.0, 1.0);<br />
	CGContextBeginPath(UIGraphicsGetCurrentContext());<br />
	CGContextMoveToPoint(UIGraphicsGetCurrentContext(), mapXFrom,mapYFrom+22);<br />
	CGContextAddLineToPoint(UIGraphicsGetCurrentContext(),(mapXFrom +mapXTo)/2,(mapYFrom+ mapYTo+22)/2);<br />
	CGContextStrokePath(UIGraphicsGetCurrentContext());<br />
	CGContextFlush(UIGraphicsGetCurrentContext());</p>
<p>	drawImage.image = UIGraphicsGetImageFromCurrentImageContext();<br />
	[self  addSubview:drawImage];<br />
	[self setUserInteractionEnabled:TRUE];<br />
	UIGraphicsEndImageContext();</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joerg</title>
		<link>http://spitzkoff.com/craig/?p=108&#038;cpage=2#comment-409</link>
		<dc:creator>Joerg</dc:creator>
		<pubDate>Tue, 13 Jul 2010 04:51:27 +0000</pubDate>
		<guid isPermaLink="false">http://spitzkoff.com/craig/?p=108#comment-409</guid>
		<description>You might want to have a look at http://github.com/mobilemelting/nvpolyline
This solution is especially targeted at iPhone OS versions prior to v.4.0

Although it can also be used in v.4.0 
Hope this helps.</description>
		<content:encoded><![CDATA[<p>You might want to have a look at <a href="http://github.com/mobilemelting/nvpolyline" rel="nofollow">http://github.com/mobilemelting/nvpolyline</a><br />
This solution is especially targeted at iPhone OS versions prior to v.4.0</p>
<p>Although it can also be used in v.4.0<br />
Hope this helps.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Merlin</title>
		<link>http://spitzkoff.com/craig/?p=108&#038;cpage=2#comment-403</link>
		<dc:creator>Merlin</dc:creator>
		<pubDate>Sat, 03 Jul 2010 20:14:34 +0000</pubDate>
		<guid isPermaLink="false">http://spitzkoff.com/craig/?p=108#comment-403</guid>
		<description>I&#039;m using the code from Matt Arturi&#039;s comment to fix the clipping problem.

One thing though - for nudging to work it should move latitude not by 0.00017 (which is fine only at the map scale in this example), but by 1% of the span:

newCenter.latitude = mapper.region.center.latitude - mapper.region.span.latitudeDelta/100;

If you move by 0.00017 then in some zoom levels that might be quite visible, and in some zoom levels it might not move at all and not protect the clipping.</description>
		<content:encoded><![CDATA[<p>I&#8217;m using the code from Matt Arturi&#8217;s comment to fix the clipping problem.</p>
<p>One thing though &#8211; for nudging to work it should move latitude not by 0.00017 (which is fine only at the map scale in this example), but by 1% of the span:</p>
<p>newCenter.latitude = mapper.region.center.latitude &#8211; mapper.region.span.latitudeDelta/100;</p>
<p>If you move by 0.00017 then in some zoom levels that might be quite visible, and in some zoom levels it might not move at all and not protect the clipping.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://spitzkoff.com/craig/?p=108&#038;cpage=2#comment-401</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Sat, 26 Jun 2010 16:44:44 +0000</pubDate>
		<guid isPermaLink="false">http://spitzkoff.com/craig/?p=108#comment-401</guid>
		<description>Thanks allot for your code.

Is there anybody out there who managed displaying routes with allot of single points?
This will be extremely slow - and blocks the mainthread, too.

Any Ideas?</description>
		<content:encoded><![CDATA[<p>Thanks allot for your code.</p>
<p>Is there anybody out there who managed displaying routes with allot of single points?<br />
This will be extremely slow &#8211; and blocks the mainthread, too.</p>
<p>Any Ideas?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: adriaan</title>
		<link>http://spitzkoff.com/craig/?p=108&#038;cpage=2#comment-398</link>
		<dc:creator>adriaan</dc:creator>
		<pubDate>Thu, 17 Jun 2010 10:20:40 +0000</pubDate>
		<guid isPermaLink="false">http://spitzkoff.com/craig/?p=108#comment-398</guid>
		<description>It sounds like I have the same issues as @Charlie Mezak and @FMulder.
What I&#039;m trying to do is to display an evolving route. Most of it&#039;s static but the last coordinate is extrapolated based (as if something is moving at a certain speed). I am trying to accomplish this with two routes - one for the static component and one for the extrapolated bit.

The problem I&#039;m having is as Charlie said that &quot;The RouteView is initializing with a non-origin frame&quot; which is causing the extrapolated route to get cropped in certain situations. And because I keep redrawing/extrapolating this every second, it gets re-cropped every second.

Does anyone have an idea on how to get the RouteView to initialize correctly, i.e. aligned with the frame of the mapview?</description>
		<content:encoded><![CDATA[<p>It sounds like I have the same issues as @Charlie Mezak and @FMulder.<br />
What I&#8217;m trying to do is to display an evolving route. Most of it&#8217;s static but the last coordinate is extrapolated based (as if something is moving at a certain speed). I am trying to accomplish this with two routes &#8211; one for the static component and one for the extrapolated bit.</p>
<p>The problem I&#8217;m having is as Charlie said that &#8220;The RouteView is initializing with a non-origin frame&#8221; which is causing the extrapolated route to get cropped in certain situations. And because I keep redrawing/extrapolating this every second, it gets re-cropped every second.</p>
<p>Does anyone have an idea on how to get the RouteView to initialize correctly, i.e. aligned with the frame of the mapview?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vijay</title>
		<link>http://spitzkoff.com/craig/?p=108&#038;cpage=2#comment-396</link>
		<dc:creator>Vijay</dc:creator>
		<pubDate>Thu, 03 Jun 2010 08:35:00 +0000</pubDate>
		<guid isPermaLink="false">http://spitzkoff.com/craig/?p=108#comment-396</guid>
		<description>I am having a problem with dragging pin when overlapped with other pin. It got stuck after lifting the pin.</description>
		<content:encoded><![CDATA[<p>I am having a problem with dragging pin when overlapped with other pin. It got stuck after lifting the pin.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 知识</title>
		<link>http://spitzkoff.com/craig/?p=108&#038;cpage=2#comment-394</link>
		<dc:creator>知识</dc:creator>
		<pubDate>Thu, 27 May 2010 15:07:32 +0000</pubDate>
		<guid isPermaLink="false">http://spitzkoff.com/craig/?p=108#comment-394</guid>
		<description>顶~~~~好文章&lt;a href=&quot;http://www.kdwx.net&quot; rel=&quot;nofollow&quot;&gt;知识分享&lt;/a&gt; 我会经常来的252</description>
		<content:encoded><![CDATA[<p>顶~~~~好文章<a href="http://www.kdwx.net" rel="nofollow">知识分享</a> 我会经常来的252</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ankush</title>
		<link>http://spitzkoff.com/craig/?p=108&#038;cpage=2#comment-384</link>
		<dc:creator>Ankush</dc:creator>
		<pubDate>Mon, 05 Apr 2010 12:11:28 +0000</pubDate>
		<guid isPermaLink="false">http://spitzkoff.com/craig/?p=108#comment-384</guid>
		<description>Hi,

Thanks for creating such a nice application.
I have used your code for my application and facing a problem i.e. when I plot the route from &quot;San Jose&quot; to &quot;New York&quot;, it works fine but when I try to zoom in or zoom out, then close the application without waiting for the zoom effect. After that I re-launch the application immediately my application crashes!!! :((

What I figured out is that when I zoom-in or zoom-out multiple drawRect events are pushed for CSRouteView from setCenter method which are still pending for the execution, when i close the application and relaunch it I somehow gets the same process back again and my application try to handle the remaining events then shuts down.

Please help me to resolve this issue.</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Thanks for creating such a nice application.<br />
I have used your code for my application and facing a problem i.e. when I plot the route from &#8220;San Jose&#8221; to &#8220;New York&#8221;, it works fine but when I try to zoom in or zoom out, then close the application without waiting for the zoom effect. After that I re-launch the application immediately my application crashes!!! <img src='http://spitzkoff.com/craig/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> (</p>
<p>What I figured out is that when I zoom-in or zoom-out multiple drawRect events are pushed for CSRouteView from setCenter method which are still pending for the execution, when i close the application and relaunch it I somehow gets the same process back again and my application try to handle the remaining events then shuts down.</p>
<p>Please help me to resolve this issue.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Routes/Lines on a MKMapView (as a MKAnnotationView) – Part 2.5 &#124; Hans Pinckaers</title>
		<link>http://spitzkoff.com/craig/?p=108&#038;cpage=2#comment-380</link>
		<dc:creator>Routes/Lines on a MKMapView (as a MKAnnotationView) – Part 2.5 &#124; Hans Pinckaers</dc:creator>
		<pubDate>Thu, 25 Mar 2010 20:55:12 +0000</pubDate>
		<guid isPermaLink="false">http://spitzkoff.com/craig/?p=108#comment-380</guid>
		<description>[...] I should credit Craig for his example of drawing lines on a MKMapView (http://spitzkoff.com/craig/?p=108), that&#8217;s where you can find part 1 and part 2. This post is a kind of teaser what I&#8217;m [...]</description>
		<content:encoded><![CDATA[<p>[...] I should credit Craig for his example of drawing lines on a MKMapView (<a href="http://spitzkoff.com/craig/?p=108" rel="nofollow">http://spitzkoff.com/craig/?p=108</a>), that&#8217;s where you can find part 1 and part 2. This post is a kind of teaser what I&#8217;m [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
