<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>JAKERI &#187; iphone</title>
	<atom:link href="http://www.jakeri.net/tag/iphone/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jakeri.net</link>
	<description>Java, JEE, Objective-C, Scalability, High-Availability, e-Commerce etc...</description>
	<lastBuildDate>Tue, 26 Jul 2011 19:27:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>Golfkartan 1.1 approved</title>
		<link>http://www.jakeri.net/2010/08/golfkartan-1-1-approved/</link>
		<comments>http://www.jakeri.net/2010/08/golfkartan-1-1-approved/#comments</comments>
		<pubDate>Wed, 11 Aug 2010 07:37:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Company]]></category>
		<category><![CDATA[golf]]></category>
		<category><![CDATA[golfkartan]]></category>
		<category><![CDATA[google maps]]></category>
		<category><![CDATA[ios4]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[navigon]]></category>

		<guid isPermaLink="false">http://www.jakeri.net/?p=424</guid>
		<description><![CDATA[Features added iOS4 support Navigon mobile navigator integration Copy GPS coordinates Bug fixes Get it while it is still hot!]]></description>
			<content:encoded><![CDATA[<p>Features added</p>
<ul>
<li>iOS4 support</li>
<li>Navigon mobile navigator integration</li>
<li>Copy GPS coordinates</li>
<li>Bug fixes</li>
</ul>
<p>Get <a href="http://itunes.com/app/golfkartan">it</a> while it is still hot!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jakeri.net/2010/08/golfkartan-1-1-approved/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gasmacken 3.1 approved</title>
		<link>http://www.jakeri.net/2010/08/gasmacken-3-1-approved/</link>
		<comments>http://www.jakeri.net/2010/08/gasmacken-3-1-approved/#comments</comments>
		<pubDate>Tue, 03 Aug 2010 07:08:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Company]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[biogas]]></category>
		<category><![CDATA[CNG]]></category>
		<category><![CDATA[gasmacken]]></category>

		<guid isPermaLink="false">http://www.jakeri.net/?p=419</guid>
		<description><![CDATA[A new release for Gasmacken is out, version 3.1. iOS4 fixes Integration with Navigon mobilenavigator Possible to copy GPS coordinates Access navigation button from info page As always, download from iTunes app store.]]></description>
			<content:encoded><![CDATA[<p>A new release for <a href="http://www.jakeri.net/gasmacken">Gasmacken</a> is out, version 3.1.</p>
<ul>
<li>iOS4 fixes</li>
<li>Integration with Navigon mobilenavigator</li>
<li>Possible to copy GPS coordinates</li>
<li>Access navigation button from info page</li>
</ul>
<p>As always, download from<a href="http://www.jakeri.net/gasmacken"> iTunes app store</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jakeri.net/2010/08/gasmacken-3-1-approved/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gasmacken 3.0 approved</title>
		<link>http://www.jakeri.net/2010/05/gasmacken-3-0-approved/</link>
		<comments>http://www.jakeri.net/2010/05/gasmacken-3-0-approved/#comments</comments>
		<pubDate>Sun, 23 May 2010 19:10:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Company]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[3.0]]></category>
		<category><![CDATA[biogas]]></category>
		<category><![CDATA[CNG]]></category>
		<category><![CDATA[gasmacken]]></category>
		<category><![CDATA[google maps]]></category>

		<guid isPermaLink="false">http://www.jakeri.net/?p=398</guid>
		<description><![CDATA[Gasmacken 3.0 is now available in the App Store. It took about 5 days waiting for review and about 45 minutes to be reviewed. The major new feature is more countries available, Sweden, Germany, Austria, Switzerland, Italy and Finland. CNG &#8230; <a href="http://www.jakeri.net/2010/05/gasmacken-3-0-approved/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.jakeri.net/gasmacken/">Gasmacken 3.0</a> is now available in the <a href="http://itunes.com/app/gasmacken">App Store</a>. It took about 5 days waiting for review and about 45 minutes to be reviewed.<br />
The major new feature is more countries available, Sweden, Germany, Austria, Switzerland, Italy and Finland.</p>
<ul>
<li>CNG stations for Sweden, Germany, Italy, Austria, Switzerland and Finland. More to come.</li>
<li>Possible to dynamically add new countries</li>
<li>Remember old position between restarts both in list and map</li>
<li>German localization</li>
</ul>

<a href='http://www.jakeri.net/2010/05/gasmacken-3-0-approved/screenshot_29/' title='Screenshot_29'><img width="150" height="150" src="http://www.jakeri.net/wp-content/uploads/2010/05/Screenshot_29-150x150.png" class="attachment-thumbnail" alt="Screenshot_29" title="Screenshot_29" /></a>
<a href='http://www.jakeri.net/2010/05/gasmacken-3-0-approved/screenshot_30/' title='Screenshot_30'><img width="150" height="150" src="http://www.jakeri.net/wp-content/uploads/2010/05/Screenshot_30-150x150.png" class="attachment-thumbnail" alt="Screenshot_30" title="Screenshot_30" /></a>
<a href='http://www.jakeri.net/2010/05/gasmacken-3-0-approved/screenshot_31/' title='Screenshot_31'><img width="150" height="150" src="http://www.jakeri.net/wp-content/uploads/2010/05/Screenshot_31-150x150.png" class="attachment-thumbnail" alt="Screenshot_31" title="Screenshot_31" /></a>
<a href='http://www.jakeri.net/2010/05/gasmacken-3-0-approved/screenshot_32/' title='Screenshot_32'><img width="150" height="150" src="http://www.jakeri.net/wp-content/uploads/2010/05/Screenshot_32-150x150.png" class="attachment-thumbnail" alt="Screenshot_32" title="Screenshot_32" /></a>
<a href='http://www.jakeri.net/2010/05/gasmacken-3-0-approved/screenshot_33/' title='Screenshot_33'><img width="150" height="150" src="http://www.jakeri.net/wp-content/uploads/2010/05/Screenshot_33-150x150.png" class="attachment-thumbnail" alt="Screenshot_33" title="Screenshot_33" /></a>
<a href='http://www.jakeri.net/2010/05/gasmacken-3-0-approved/screenshot_34/' title='Screenshot_34'><img width="150" height="150" src="http://www.jakeri.net/wp-content/uploads/2010/05/Screenshot_34-150x150.png" class="attachment-thumbnail" alt="Screenshot_34" title="Screenshot_34" /></a>

]]></content:encoded>
			<wfw:commentRss>http://www.jakeri.net/2010/05/gasmacken-3-0-approved/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Revisited &#8211; Custom callout bubble in MKMapView, final solution!</title>
		<link>http://www.jakeri.net/2010/05/custom-callout-bubble-final-solution-revisited/</link>
		<comments>http://www.jakeri.net/2010/05/custom-callout-bubble-final-solution-revisited/#comments</comments>
		<pubDate>Sun, 16 May 2010 18:03:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[callout bubble]]></category>
		<category><![CDATA[google maps]]></category>
		<category><![CDATA[mkannotation]]></category>
		<category><![CDATA[mkannotationview]]></category>
		<category><![CDATA[mkmapview]]></category>
		<category><![CDATA[property change listener]]></category>

		<guid isPermaLink="false">http://www.jakeri.net/?p=392</guid>
		<description><![CDATA[I thought I had the final solution for custom callout bubbles in MKMapView but I was wrong. There were a couple of errors found after testing. If you press and hold it moves focus to the real callout bubble offset &#8230; <a href="http://www.jakeri.net/2010/05/custom-callout-bubble-final-solution-revisited/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I thought I had the <a href="http://www.jakeri.net/2009/12/custom-callout-bubble-in-mkmapview-final-solution/">final solution for custom callout bubbles in MKMapView</a> but I was wrong. There were a couple of errors found after testing.</p>
<ul>
<li>If you press and hold it moves focus to the real callout bubble offset 10000px right and 10000px down</li>
<li>It did not work on the iPad (iPhoneOS 3.2) and iPhoneOS 4.0</li>
<li>There is a leak on the property observer</li>
</ul>
<p>My latest solution solves the first two but not the third one. It works with iPhoneOS 3.0, 3.1, 3.2 and 4.0. I have only tested in simulator for 3.2 and 4.0.</p>
<p>To make it a easier to look at the code I have created my first <a href="http://github.com/jakeri/CustomCalloutMapView">github repository</a>. You can alsoe download source for master (<a href="http://github.com/jakeri/CustomCalloutMapView/zipball/master">zip</a> or <a href="http://github.com/jakeri/CustomCalloutMapView/tarball/master">tar</a>) directly from github.</p>
<p><strong>Update:</strong> I got my <a href="http://www.jakeri.net/gasmacken">application</a>, <a href="http://www.jakeri.net/gasmacken">Gasmacken</a> approved (2010-05-23) with this solution.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jakeri.net/2010/05/custom-callout-bubble-final-solution-revisited/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Golfkartan tillgänglig i iTunes App store</title>
		<link>http://www.jakeri.net/2009/12/golfkartan-tillganglig-i-itunes-app-store/</link>
		<comments>http://www.jakeri.net/2009/12/golfkartan-tillganglig-i-itunes-app-store/#comments</comments>
		<pubDate>Thu, 10 Dec 2009 04:52:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Company]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[app store]]></category>
		<category><![CDATA[golf]]></category>
		<category><![CDATA[golfbana]]></category>
		<category><![CDATA[golfbanor]]></category>
		<category><![CDATA[golfkartan]]></category>
		<category><![CDATA[golfklubb]]></category>
		<category><![CDATA[itunes]]></category>
		<category><![CDATA[sverige]]></category>

		<guid isPermaLink="false">http://www.jakeri.net/?p=372</guid>
		<description><![CDATA[Nu finns JAKERI ABs tredje iPhone-applikation, Golfkartan tillgänglig i iTunes App store. Se pressrelease för Golfkartan. Golfkartan ger dig tillgång till alla Sveriges golfbanor direkt i din iPhone. Funktioner Visar alla svenska golfbanor på en karta Lista i bokstavsordning med &#8230; <a href="http://www.jakeri.net/2009/12/golfkartan-tillganglig-i-itunes-app-store/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Nu finns JAKERI ABs tredje iPhone-applikation, <a href="http://www.jakeri.net/golfkartan">Golfkartan</a> tillgänglig i iTunes App store.</p>
<p><a href="http://itunes.apple.com/se/app/golfkartan/id343131163?mt=8"><img class="alignnone size-full wp-image-160" title="iTunes App store" src="http://www.jakeri.net/wp-content/uploads/2009/08/appstore.png" alt="iTunes App store" width="121" height="41" /></a></p>
<p>Se <a href="http://www.mynewsdesk.com/se/view/pressrelease/golfkartan-sveriges-foersta-iphone-program-med-sveriges-alla-golfbanor-351828">pressrelease</a> för Golfkartan.</p>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Golfkartan ger dig tillgång till alla Sveriges golfbanor direkt i din iPhone.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Funktioner</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Visar alla svenska golfbanor på en karta</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Lista i bokstavsordning med alla golfbanor</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Telefonnummer och emailadress till varje golfbana</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Ring eller maila direkt från programmet genom att klicka på telefonnummer eller email</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Mer information direkt tillgänglig via http://www.golf.se för varje golfbana</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Positionering med inbyggd GPS</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Möjlighet att välja mellan karta, hybrid eller satellit</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Automatisk uppdatering av listan med golfbanor</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Möjlighet till vägbeskrivning med inbyggd kartapplikation</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">&#8212;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Golfkartan gives you access to all golf courses in Sweden through your iPhone</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Features</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Show all swedish golf courses on a map</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">List all golf courses alphabetically</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Phone number and email address</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Call or email directly from the application by tapping on the phone number or email address</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">More information directly available from http://www.golf.se for each golf course</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Show your current location with built in GPS</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Choose between map, hybrid or satellite view</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Automatic updates of golf courses</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Show directions with with built in Maps application</div>
<p>Golfkartan ger dig tillgång till alla Sveriges golfbanor direkt i din iPhone.</p>
<p><strong>Funktioner</strong></p>
<ul>
<li>Visar alla svenska golfbanor på en karta</li>
<li>Lista i bokstavsordning med alla golfbanor</li>
<li>Telefonnummer och emailadress till varje golfbana</li>
<li>Ring eller maila direkt från programmet genom att klicka på telefonnummer eller email</li>
<li>Mer information direkt tillgänglig via http://www.golf.se för varje golfbana</li>
<li>Positionering med inbyggd GPS</li>
<li>Möjlighet att välja mellan karta, hybrid eller satellit</li>
<li>Automatisk uppdatering av listan med golfbanor</li>
<li>Möjlighet till vägbeskrivning med inbyggd kartapplikation</li>
</ul>

<a href='http://www.jakeri.net/2009/12/golfkartan-tillganglig-i-itunes-app-store/screenshot_18-2/' title='Screenshot_18'><img width="150" height="150" src="http://www.jakeri.net/wp-content/uploads/2009/12/Screenshot_18-150x150.jpg" class="attachment-thumbnail" alt="Screenshot_18" title="Screenshot_18" /></a>
<a href='http://www.jakeri.net/2009/12/golfkartan-tillganglig-i-itunes-app-store/screenshot_19-2/' title='Screenshot_19'><img width="150" height="150" src="http://www.jakeri.net/wp-content/uploads/2009/12/Screenshot_19-150x150.jpg" class="attachment-thumbnail" alt="Screenshot_19" title="Screenshot_19" /></a>
<a href='http://www.jakeri.net/2009/12/golfkartan-tillganglig-i-itunes-app-store/screenshot_20-2/' title='Screenshot_20'><img width="150" height="150" src="http://www.jakeri.net/wp-content/uploads/2009/12/Screenshot_20-150x150.jpg" class="attachment-thumbnail" alt="Screenshot_20" title="Screenshot_20" /></a>
<a href='http://www.jakeri.net/2009/12/golfkartan-tillganglig-i-itunes-app-store/screenshot_21-2/' title='Screenshot_21'><img width="150" height="150" src="http://www.jakeri.net/wp-content/uploads/2009/12/Screenshot_21-150x150.jpg" class="attachment-thumbnail" alt="Screenshot_21" title="Screenshot_21" /></a>
<a href='http://www.jakeri.net/2009/12/golfkartan-tillganglig-i-itunes-app-store/screenshot_22-2/' title='Screenshot_22'><img width="150" height="150" src="http://www.jakeri.net/wp-content/uploads/2009/12/Screenshot_22-150x150.jpg" class="attachment-thumbnail" alt="Screenshot_22" title="Screenshot_22" /></a>

]]></content:encoded>
			<wfw:commentRss>http://www.jakeri.net/2009/12/golfkartan-tillganglig-i-itunes-app-store/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Custom callout bubble in MKMapView, final solution!</title>
		<link>http://www.jakeri.net/2009/12/custom-callout-bubble-in-mkmapview-final-solution/</link>
		<comments>http://www.jakeri.net/2009/12/custom-callout-bubble-in-mkmapview-final-solution/#comments</comments>
		<pubDate>Sun, 06 Dec 2009 13:20:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[callout bubble]]></category>
		<category><![CDATA[google maps]]></category>
		<category><![CDATA[mkannotation]]></category>
		<category><![CDATA[mkannotationview]]></category>
		<category><![CDATA[mkmapview]]></category>
		<category><![CDATA[property change listener]]></category>

		<guid isPermaLink="false">http://www.jakeri.net/?p=349</guid>
		<description><![CDATA[Once again, this post has been updated. I was not completely satisfied with my prior solution to custom callout bubble in MKMapView due a drawback. One drawback is that if you click an annotation in the TouchView it is not &#8230; <a href="http://www.jakeri.net/2009/12/custom-callout-bubble-in-mkmapview-final-solution/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Once again, this post has been <a href="http://www.jakeri.net/2010/05/custom-callout-bubble-final-solution-revisited/">updated</a>.</p>
<p>I was not completely satisfied with my prior solution to <a href="http://www.jakeri.net/2009/11/custom-callout-bubble-to-mkmapview-in-iphone/">custom callout bubble in MKMapView</a> due a drawback.</p>
<blockquote><p>One drawback is that if you click an annotation in the TouchView it is not propagated down to the MKMapView which makes pinch zoom bit more tricky if you have many annotations. Someone out there might have a good solution for it?</p></blockquote>
<p>Fortunately I figured out a new solution for the problem! A much more simple solution too.</p>
<p>It is a combination of the <a href="http://blog.evandavey.com/2009/07/how-to-detect-when-mkannotation-mkannotationview-is-selected.html">property change listener</a> solution and moving the <a href="http://developer.apple.com/iphone/library/documentation/MapKit/Reference/MKAnnotationView_Class/Reference/Reference.html#//apple_ref/occ/instp/MKAnnotationView/calloutOffset">calloutOffset</a> off the display.</p>
<p>Set the calloutOffset off the display and add an observer to the selected-property.<br />
<code>- (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id )annotation {</code></p>
<p><code>MKAnnotationView* annotationView = nil;</code></p>
<p><code>MyAnnotation *myAnnotation = (MyAnnotation*) annotation;<br />
NSString* identifier = @"Pin";<br />
MKPinAnnotationView* annView = (MKPinAnnotationView*)[self.mapView dequeueReusableAnnotationViewWithIdentifier:identifier];</code></p>
<p><code> </code></p>
<p><code>if(nil == annView) {<br />
annView = [[[MKPinAnnotationView alloc] initWithAnnotation:myAnnotation reuseIdentifier:identifier] autorelease];<br />
}<br />
//Add an observer for the selected-property on the MKAnnotationView. Delegate to self.<br />
[annView addObserver:self<br />
forKeyPath:@"selected"<br />
options:NSKeyValueObservingOptionNew<br />
context:GMAP_ANNOTATION_SELECTED];</code></p>
<p><code> </code></p>
<p><code>[annView setPinColor:MKPinAnnotationColorGreen];</p>
<p>//Set calloutOffset off screen.<br />
CGPoint notNear = CGPointMake(10000.0,10000.0);<br />
annView.calloutOffset = notNear;<br />
annotationView = annView;</p>
<p>[annotationView setEnabled:YES];<br />
[annotationView setCanShowCallout:YES];</p>
<p></code></p>
<p><code> return annotationView;<br />
}</code></p>
<p>Implement the observeValueForKeyPath method. It will be triggered when the property is selected or deselected.<br />
<code><br />
- (void)observeValueForKeyPath:(NSString *)keyPath<br />
ofObject:(id)object<br />
change:(NSDictionary *)change<br />
context:(void *)context{</code></p>
<p><code>NSString *action = (NSString*)context;</code></p>
<p><code> </code></p>
<p><code> if([action isEqualToString:GMAP_ANNOTATION_SELECTED]){<br />
BOOL annotationAppeared = [[change valueForKey:@"new"] boolValue];<br />
if (annotationAppeared) {<br />
[self showAnnotation:((MyAnnotationView*) object).annotation];<br />
}<br />
else {<br />
NSLog(@"annotation deselected %@", ((MyAnnotationView*) object).annotation.title);<br />
[self hideAnnotation];<br />
}<br />
}<br />
}<br />
</code></p>
<p><a href="http://www.jakeri.net/wp-content/uploads/2009/12/Screenshot_17.png"><img class="alignnone size-medium wp-image-363" title="Screenshot_17" src="http://www.jakeri.net/wp-content/uploads/2009/12/Screenshot_17-156x300.png" alt="Screenshot_17" width="156" height="300" /></a></p>
<p>Take a look at my <a href="http://www.jakeri.net/wp-content/uploads/2009/12/FinalCustomCalloutMapView.zip">new example</a> (with standard MKPinAnnotationView) or with <a href="http://www.jakeri.net/wp-content/uploads/2009/12/CustomCalloutMapView-custom-annotationView.zip">custom annotation view</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jakeri.net/2009/12/custom-callout-bubble-in-mkmapview-final-solution/feed/</wfw:commentRss>
		<slash:comments>39</slash:comments>
		</item>
		<item>
		<title>Custom callout bubble to MKMapView in iPhone</title>
		<link>http://www.jakeri.net/2009/11/custom-callout-bubble-to-mkmapview-in-iphone/</link>
		<comments>http://www.jakeri.net/2009/11/custom-callout-bubble-to-mkmapview-in-iphone/#comments</comments>
		<pubDate>Sun, 01 Nov 2009 21:37:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Company]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[callout bubble]]></category>
		<category><![CDATA[google maps]]></category>
		<category><![CDATA[mkannotation]]></category>
		<category><![CDATA[mkannotationview]]></category>
		<category><![CDATA[mkmapview]]></category>

		<guid isPermaLink="false">http://www.jakeri.net/?p=286</guid>
		<description><![CDATA[UPDATE! FOUND A NEW SOLUTION! My latest version, 2.0 of Gasmacken contains a solution to the very annoying problem with a creating a custom callout bubble to the MKMapView in the iPhone SDK. There are no way to get a callback &#8230; <a href="http://www.jakeri.net/2009/11/custom-callout-bubble-to-mkmapview-in-iphone/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><strong>UPDATE! FOUND A NEW <a href="http://www.jakeri.net/2009/12/custom-callout-bubble-in-mkmapview-final-solution/">SOLUTION!</a></strong></p>
<p>My latest version, 2.0 of <a href="http://www.jakeri.net/gasmacken">Gasmacken</a> contains a solution to the very annoying problem with a creating a <a href="http://stackoverflow.com/questions/1565828/customize-callout-bubble-for-annotationview">custom</a> <a href="http://stackoverflow.com/questions/1350050/custom-mkannotationview-callout">callout</a> <a href="http://stackoverflow.com/questions/1525114/custom-popup-when-clicking-pin-in-mkmapview">bubble</a> to the MKMapView in the iPhone SDK. There are <strong>no way</strong> to get a callback from the MKMapView delegate when a callout bubble is opened.</p>
<p><a href="http://www.jakeri.net/wp-content/uploads/2009/10/Screenshot_4.jpg"><img class="aligncenter size-medium wp-image-281" title="custom callout bubble" src="http://www.jakeri.net/wp-content/uploads/2009/10/Screenshot_4-208x300.jpg" alt="custom callout bubble" width="208" height="300" /></a></p>
<p>A recap of what you can do with the built in callout bubble.</p>
<ul>
<li><a href="http://developer.apple.com/IPhone/library/documentation/MapKit/Reference/MKAnnotation_Protocol/Reference/Reference.html">MKAnnotation</a> contains title, subtitle and coordinate</li>
<li>Title must be set in the MKAnnotation to get the callout bubble</li>
<li>You can customize left or right of the callout bubble (<a href="http://developer.apple.com/iphone/library/DOCUMENTATION/MapKit/Reference/MKAnnotationView_Class/Reference/Reference.html#//apple_ref/doc/c_ref/MKAnnotationView">MKAnnotationView</a>) with a UIView but not change the callout bubble design at all</li>
</ul>
<p>One solution (almost) might be to use a <a href="http://blog.evandavey.com/2009/07/how-to-detect-when-mkannotation-mkannotationview-is-selected.html">property change listener</a> for the selected value. Unfortunately, the selected property is only changed if you have a title set in the MKAnnotation, which also brings up the built in callout bubble. This is a good solution if you e.g. want to play a sound when you open up the built in callout bubble.</p>
<p><strong>My solution</strong>, inspired by <a href="http://spitzkoff.com/craig/?p=108">drawing polylines or routes on a MKMapView</a>, has to do with adding a subview (TouchView see code in example) on top of the MKMapView and writing invisible buttons on the annotations.</p>
<p><code><br />
#import<br />
#import </code></p>
<p><code> </code></p>
<p><code>@class UIView;</code></p>
<p><code>@interface TouchView : UIView {<br />
MKMapView *mapView;<br />
id delegate;<br />
SEL callAtHitTest;<br />
SEL callAtAnnotationClick;<br />
NSMutableArray* buttonToAnnotation;<br />
}<br />
@property (nonatomic, assign) MKMapView * mapView;<br />
@property (assign) id delegate;<br />
@property (assign) SEL callAtHitTest;<br />
@property (assign) SEL callAtAnnotationClick;</p>
<p></code></p>
<p><code>- (void) regionChange;<br />
@end<br />
</code></p>
<ul>
<li>Selector <em>callAtHitTest</em> will be called every time you click on the map except for subview buttons. This method is great to use for stop follow current location updates in your code.</li>
<li>Selector <em><strong>callAtAnnotationClick</strong></em> will be called when you click your annotation. <strong>This is where you make your custom callout bubble visible.</strong></li>
<li>Method <em>regionChange</em> must be called every time MKMapView is changed.</li>
</ul>
<p>In a UIView sub class</p>
<ol>
<li>Create a TouchView, set delegate and the two selectors, <em>callAtHitTest</em> and <em>callAtAnnotationClick</em>.</li>
<li>Add MKMapView as a subview to your newly created touchView. Implement <em>MKMapViewDelegate </em><em>regionDidChangeAnimated. </em>Call method regionChanged in your TouchView class.</li>
<li>Populate MKMapView with annotations.</li>
<li>Add newly created MKMapView to your TouchView.</li>
<li>Add TouchView to surrounding UIView.</li>
<li>Call method regionChange once in TouchView.</li>
</ol>
<p>Here is the viewDidLoad method from the example code.</p>
<p><code><br />
- (void)viewDidLoad {<br />
[super viewDidLoad];</code></p>
<p><code> </code></p>
<p><code>touchView = [[TouchView alloc] initWithFrame:CGRectMake(0, 0, 320, 460)];<br />
touchView.delegate = self;<br />
touchView.callAtHitTest = @selector(stopFollowLocation);<br />
touchView.callAtAnnotationClick = @selector(annotationClicked:);<br />
//Next we create the MKMapView object, which will be added as a subview of viewTouch<br />
mapView = [[MKMapView alloc] initWithFrame:CGRectMake(0, 0, 320, 460)];<br />
mapView.delegate = self;<br />
touchView.mapView = mapView;<br />
[touchView addSubview:mapView];</code></p>
<p><code>//And we display everything!<br />
[self.view addSubview:touchView];</p>
<p>CLLocationCoordinate2D sweLoc = {63.048230,15.685730};<br />
MKCoordinateSpan sweSpan = MKCoordinateSpanMake(14.208889, 24.169922);<br />
MKCoordinateRegion sweRegion = MKCoordinateRegionMake(sweLoc, sweSpan);</p>
<p>mapView.region = sweRegion;</p>
<p>//Populate some test annotations.<br />
NSMutableArray* annotations = [[NSMutableArray alloc] init];<br />
CLLocationCoordinate2D coord2d = {59.33984880,18.11479872};<br />
MyAnnotation *anno = [[MyAnnotation alloc] initWithCoords:coord2d name:@"Somewhere"];<br />
[annotations addObject:anno];<br />
[anno release];</p>
<p>CLLocationCoordinate2D coord2d1 = {65.80253606,21.67445822};<br />
MyAnnotation *anno1 = [[MyAnnotation alloc] initWithCoords:coord2d1 name:@"Nowhere"];<br />
[annotations addObject:anno1];<br />
[anno1 release];</p>
<p>CLLocationCoordinate2D coord2d2 = {55.71919202,13.15571100};<br />
MyAnnotation *anno2 = [[MyAnnotation alloc] initWithCoords:coord2d2 name:@"Anywhere"];<br />
[annotations addObject:anno2];<br />
[anno2 release];</p>
<p>[mapView addAnnotations:annotations];</p>
<p>[annotations release];</p>
<p>//redraw buttons<br />
[touchView regionChange];</p>
<p></code></p>
<p><code>}<br />
</code><br />
<strong>Remember to NOT set </strong><em><strong>title</strong></em><strong> and </strong><em><strong>subtitle</strong></em><strong> in your implementation of MKAnnotation</strong>. If it is set MKMapView will show the standard callout bubble if you accidentally click outside the TouchView button but inside the standard annotation in the MKMapView.</p>
<p>You might have to do some customization in your TouchView if you <strong>do not use the standard MKPinAnnotationView</strong>. Change <strong>CGRect coordinates for the buttons in TouchView</strong> to match your custom annotation view. Change UIButtonTypeRoundedRect to see the actual button and match it to cover your custom annotation view.</p>
<p><span style="text-decoration: line-through;">One drawback is that if you click a annotation in the TouchView it is not propagated down to the MKMapView which makes pinch zoom bit more tricky if you have many annotations.</span> Someone out there might have a <a href="http://www.jakeri.net/2009/12/custom-callout-bubble-in-mkmapview-final-solution/">good solution</a> for it?</p>
<p><span style="text-decoration: line-through;">That&#8217;s it. Download </span><a href="http://www.jakeri.net/wp-content/uploads/2009/11/CustomCalloutMapView.zip"><span style="text-decoration: line-through;">example</span></a><span style="text-decoration: line-through;"> for better understanding</span>. See this <a href="http://www.jakeri.net/2009/12/custom-callout-bubble-in-mkmapview-final-solution/">post</a> instead.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jakeri.net/2009/11/custom-callout-bubble-to-mkmapview-in-iphone/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Gasmacken 2.0 sent to Apple for review</title>
		<link>http://www.jakeri.net/2009/10/gasmacken-2-0-sent-to-apple-for-review/</link>
		<comments>http://www.jakeri.net/2009/10/gasmacken-2-0-sent-to-apple-for-review/#comments</comments>
		<pubDate>Sat, 31 Oct 2009 16:05:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Company]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[2.0]]></category>
		<category><![CDATA[biogas]]></category>
		<category><![CDATA[CNG]]></category>
		<category><![CDATA[gasmacken]]></category>

		<guid isPermaLink="false">http://www.jakeri.net/?p=277</guid>
		<description><![CDATA[Gasmacken 2.0 was submitted for review to iTunes App store last friday. It usually takes 1.5 to 2 weeks before approved (if no bugs or violations found). More information presented to the user. Such as prices, opening hours, owner, contact &#8230; <a href="http://www.jakeri.net/2009/10/gasmacken-2-0-sent-to-apple-for-review/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Gasmacken 2.0 was submitted for review to iTunes App store last friday. It usually takes 1.5 to 2 weeks before approved (if no bugs or violations found).</p>
<p>More information presented to the user. Such as prices, opening hours, owner, contact information and extra information.</p>

<a href='http://www.jakeri.net/2009/10/gasmacken-2-0-sent-to-apple-for-review/screenshot_1/' title='Screenshot_1'><img width="150" height="150" src="http://www.jakeri.net/wp-content/uploads/2009/10/Screenshot_1-150x150.jpg" class="attachment-thumbnail" alt="Screenshot_1" title="Screenshot_1" /></a>
<a href='http://www.jakeri.net/2009/10/gasmacken-2-0-sent-to-apple-for-review/screenshot_2/' title='Screenshot_2'><img width="150" height="150" src="http://www.jakeri.net/wp-content/uploads/2009/10/Screenshot_2-150x150.jpg" class="attachment-thumbnail" alt="Screenshot_2" title="Screenshot_2" /></a>
<a href='http://www.jakeri.net/2009/10/gasmacken-2-0-sent-to-apple-for-review/screenshot_3/' title='Screenshot_3'><img width="150" height="150" src="http://www.jakeri.net/wp-content/uploads/2009/10/Screenshot_3-150x150.jpg" class="attachment-thumbnail" alt="Screenshot_3" title="Screenshot_3" /></a>
<a href='http://www.jakeri.net/2009/10/gasmacken-2-0-sent-to-apple-for-review/screenshot_4/' title='custom callout bubble'><img width="150" height="150" src="http://www.jakeri.net/wp-content/uploads/2009/10/Screenshot_4-150x150.jpg" class="attachment-thumbnail" alt="custom callout bubble" title="custom callout bubble" /></a>
<a href='http://www.jakeri.net/2009/10/gasmacken-2-0-sent-to-apple-for-review/screenshot_5/' title='Screenshot_5'><img width="150" height="150" src="http://www.jakeri.net/wp-content/uploads/2009/10/Screenshot_5-150x150.jpg" class="attachment-thumbnail" alt="Screenshot_5" title="Screenshot_5" /></a>

]]></content:encoded>
			<wfw:commentRss>http://www.jakeri.net/2009/10/gasmacken-2-0-sent-to-apple-for-review/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gasmacken på Aftonbladet</title>
		<link>http://www.jakeri.net/2009/10/gasmacken-pa-aftonbladet/</link>
		<comments>http://www.jakeri.net/2009/10/gasmacken-pa-aftonbladet/#comments</comments>
		<pubDate>Mon, 12 Oct 2009 15:47:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Company]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[aftonbladet]]></category>
		<category><![CDATA[biogas]]></category>
		<category><![CDATA[CNG]]></category>
		<category><![CDATA[gasmacken]]></category>

		<guid isPermaLink="false">http://www.jakeri.net/?p=266</guid>
		<description><![CDATA[Aftonbladet skriver om Gasmacken!]]></description>
			<content:encoded><![CDATA[<p>Aftonbladet <a href="http://www.aftonbladet.se/bil/article5946890.ab">skriver</a> om Gasmacken!<br />
<a href="http://www.jakeri.net/wp-content/uploads/2009/10/Screen-shot-2009-10-12-at-17.22.18.png"><img class="size-medium wp-image-270 alignnone" title="Screen shot 2009-10-12 at 17.22.18" src="http://www.jakeri.net/wp-content/uploads/2009/10/Screen-shot-2009-10-12-at-17.22.18-300x187.png" alt="Screen shot 2009-10-12 at 17.22.18" width="300" height="187" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jakeri.net/2009/10/gasmacken-pa-aftonbladet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gasmacken available for sale</title>
		<link>http://www.jakeri.net/2009/10/gasmacken-available-for-sale/</link>
		<comments>http://www.jakeri.net/2009/10/gasmacken-available-for-sale/#comments</comments>
		<pubDate>Thu, 08 Oct 2009 06:30:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Company]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[biogas]]></category>
		<category><![CDATA[CNG]]></category>
		<category><![CDATA[fordonsgas]]></category>
		<category><![CDATA[gasmacken]]></category>

		<guid isPermaLink="false">http://www.jakeri.net/?p=245</guid>
		<description><![CDATA[My latest iPhone application Gasmacken has been approved by Apple! Gasmacken is an application that automatically fetches an updated list of all CNG (Compressed Natural Gas) refuelling stations in Sweden and displays them on a map. Features List all CNG &#8230; <a href="http://www.jakeri.net/2009/10/gasmacken-available-for-sale/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>My latest iPhone application <a href="http://www.jakeri.net/gasmacken">Gasmacken</a> has been approved by Apple!</p>
<p><a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=333227624&amp;mt=8&amp;s=143460"><img class="alignnone size-full wp-image-160" title="Gasmacken" src="http://www.jakeri.net/wp-content/uploads/2009/08/appstore.png" alt="Gasmacken" width="121" height="41" /></a></p>
<p>Gasmacken is an application that automatically fetches an updated list of all CNG (Compressed Natural Gas) refuelling stations in Sweden and displays them on a map.</p>
<p><strong>Features</strong></p>
<ul>
<li>List all CNG stations in Sweden</li>
<li>Show your current location</li>
<li>Automatic updates of CNG stations in Sweden</li>
<li>Show directions with with built in Maps application</li>
</ul>
<p><strong>Swedish information about Gasmacken</strong></p>
<p>Gasmacken är ett program som automatiskt hämtar en uppdaterad lista över alla gasmackar i Sverige och presenterar dem på en karta.</p>
<p><strong>Funktioner</strong></p>
<ul>
<li>Lista med alla tankställen för fordonsgas i Sverige</li>
<li>Positionering med inbyggd GPS</li>
<li>Automatisk uppdatering av listan med tankställen för fordonsgas</li>
<li>Vägbeskrivning med inbyggd kartapplikation</li>
</ul>
<p><img class="alignnone size-full wp-image-216" title="Screenshot 2009.09.25 22.39.53" src="http://www.jakeri.net/wp-content/uploads/2009/09/Screenshot-2009.09.25-22.39.531.png" alt="Screenshot 2009.09.25 22.39.53" width="320" height="480" /><img class="alignnone size-full wp-image-217" title="Screenshot 2009.09.25 22.40.18" src="http://www.jakeri.net/wp-content/uploads/2009/09/Screenshot-2009.09.25-22.40.181.png" alt="Screenshot 2009.09.25 22.40.18" width="320" height="480" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jakeri.net/2009/10/gasmacken-available-for-sale/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

