<?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: Accessing the GPS in iPhone Safari</title>
	<atom:link href="http://www.thecssninja.com/javascript/geolocation-iphone/feed" rel="self" type="application/rss+xml" />
	<link>http://www.thecssninja.com/javascript/geolocation-iphone</link>
	<description>All things CSS, JavaScript &#38; HTML</description>
	<lastBuildDate>Sat, 21 Jan 2012 04:46:38 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
	<item>
		<title>By: Daniel</title>
		<link>http://www.thecssninja.com/javascript/geolocation-iphone/comment-page-1#comment-4356</link>
		<dc:creator>Daniel</dc:creator>
		<pubDate>Mon, 05 Dec 2011 15:20:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.thecssninja.com/?p=287#comment-4356</guid>
		<description>Hey,

I&#039;m having the same problem as some of you guys. Even though I approve the popup asking if my website is allowed to use my position date I always get a &quot;User denied Geolocation&quot; error. I tried resetting location warnings, cache, cookies etc. but nothing helps.

Has anybody found a solution for this without having to reset the whole phone?

// Daniel</description>
		<content:encoded><![CDATA[<p>Hey,</p>
<p>I&#8217;m having the same problem as some of you guys. Even though I approve the popup asking if my website is allowed to use my position date I always get a &#8220;User denied Geolocation&#8221; error. I tried resetting location warnings, cache, cookies etc. but nothing helps.</p>
<p>Has anybody found a solution for this without having to reset the whole phone?</p>
<p>// Daniel</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan Seddon</title>
		<link>http://www.thecssninja.com/javascript/geolocation-iphone/comment-page-1#comment-3239</link>
		<dc:creator>Ryan Seddon</dc:creator>
		<pubDate>Tue, 15 Nov 2011 23:37:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.thecssninja.com/?p=287#comment-3239</guid>
		<description>@&lt;a href=&quot;#comment-3176&quot; rel=&quot;nofollow&quot;&gt;andy&lt;/a&gt; - 

You can&#039;t suppress the OS dialog.</description>
		<content:encoded><![CDATA[<p>@<a href="#comment-3176" rel="nofollow">andy</a> &#8211; </p>
<p>You can&#8217;t suppress the OS dialog.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: andy leontovich</title>
		<link>http://www.thecssninja.com/javascript/geolocation-iphone/comment-page-1#comment-3176</link>
		<dc:creator>andy leontovich</dc:creator>
		<pubDate>Mon, 14 Nov 2011 21:54:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.thecssninja.com/?p=287#comment-3176</guid>
		<description>Hi. Is there a way to suppress the dialog that asks if my page would like to use your current location? I&#039;m using jQueryMobile and would like to show my own dialog.

Thanks!</description>
		<content:encoded><![CDATA[<p>Hi. Is there a way to suppress the dialog that asks if my page would like to use your current location? I&#8217;m using jQueryMobile and would like to show my own dialog.</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: @RB</title>
		<link>http://www.thecssninja.com/javascript/geolocation-iphone/comment-page-1#comment-2705</link>
		<dc:creator>@RB</dc:creator>
		<pubDate>Tue, 13 Sep 2011 03:08:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.thecssninja.com/?p=287#comment-2705</guid>
		<description>Same problem here as Victor.  Choosing Deny on the &quot;...would like to use your location...&quot; popup pretty much permanently disables geoLocation.  Even if I use Settings -&gt; General -&gt; Reset Location Warnings, yes the popup asking if I want to allow Safari to use my location does in fact popup, but afterwards, the getCurrentPostion call ALWAYS fails with code: 1 message &quot;User denied GeoLocation&quot;, even if I select Allow.  This has most certainly got to be a bug in the geo location service of the phone.  The same app and code based pushed to a staging site works perfectly fine on chrome and safari browsers, as well as the iPhone Emulator from XCode.  These all allow you to simply clear the cache and reload the site and have the geoLocation work fine.</description>
		<content:encoded><![CDATA[<p>Same problem here as Victor.  Choosing Deny on the &#8220;&#8230;would like to use your location&#8230;&#8221; popup pretty much permanently disables geoLocation.  Even if I use Settings -&gt; General -&gt; Reset Location Warnings, yes the popup asking if I want to allow Safari to use my location does in fact popup, but afterwards, the getCurrentPostion call ALWAYS fails with code: 1 message &#8220;User denied GeoLocation&#8221;, even if I select Allow.  This has most certainly got to be a bug in the geo location service of the phone.  The same app and code based pushed to a staging site works perfectly fine on chrome and safari browsers, as well as the iPhone Emulator from XCode.  These all allow you to simply clear the cache and reload the site and have the geoLocation work fine.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan Seddon</title>
		<link>http://www.thecssninja.com/javascript/geolocation-iphone/comment-page-1#comment-2617</link>
		<dc:creator>Ryan Seddon</dc:creator>
		<pubDate>Fri, 24 Jun 2011 01:44:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.thecssninja.com/?p=287#comment-2617</guid>
		<description>@&lt;a href=&quot;#comment-2607&quot; rel=&quot;nofollow&quot;&gt;Victor&lt;/a&gt; - 

If you navigate to settings &gt; general &gt; reset and tap Reset Location Warnings that should fix your problem. Make sure to kill safari too just to make sure it boots up a new instance.</description>
		<content:encoded><![CDATA[<p>@<a href="#comment-2607" rel="nofollow">Victor</a> &#8211; </p>
<p>If you navigate to settings &gt; general &gt; reset and tap Reset Location Warnings that should fix your problem. Make sure to kill safari too just to make sure it boots up a new instance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Victor</title>
		<link>http://www.thecssninja.com/javascript/geolocation-iphone/comment-page-1#comment-2607</link>
		<dc:creator>Victor</dc:creator>
		<pubDate>Mon, 20 Jun 2011 15:39:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.thecssninja.com/?p=287#comment-2607</guid>
		<description>Hi!

I am facing a problem with the geolocation API which I hope you might be able to help me with. 

Some of people here commented that when denying the access to the position on the prompt, the geolocation got &quot;blocked&quot; and it became necessary to reset the location warnings on the iphone in order to make it to work again.

Well, in my case the thing is that even if I restart the location warning, when I call the getCurrentLocation I always get the error 1 (User denied location) even though I haven´t said anything... Has anyone faced the same problem and still continued after restarted the location warnings?

Thanks so much for your help in advance.

Cheers, Victor</description>
		<content:encoded><![CDATA[<p>Hi!</p>
<p>I am facing a problem with the geolocation API which I hope you might be able to help me with. </p>
<p>Some of people here commented that when denying the access to the position on the prompt, the geolocation got &#8220;blocked&#8221; and it became necessary to reset the location warnings on the iphone in order to make it to work again.</p>
<p>Well, in my case the thing is that even if I restart the location warning, when I call the getCurrentLocation I always get the error 1 (User denied location) even though I haven´t said anything&#8230; Has anyone faced the same problem and still continued after restarted the location warnings?</p>
<p>Thanks so much for your help in advance.</p>
<p>Cheers, Victor</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: The Css Ninja</title>
		<link>http://www.thecssninja.com/javascript/geolocation-iphone/comment-page-1#comment-2375</link>
		<dc:creator>The Css Ninja</dc:creator>
		<pubDate>Thu, 27 Jan 2011 01:34:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.thecssninja.com/?p=287#comment-2375</guid>
		<description>@Emmanuel G
Does the demo prompt you for GPS access? If not you may either have location services turned off for Safari. Settings &gt; General &gt; Location Services, make sure that toggle switch is on. Another reason why it might not be working is if you have denied access to the request before. You&#039;ll possibly need to reset location warnings to get prompted again, Settings &gt; General &gt; Reset.</description>
		<content:encoded><![CDATA[<p>@Emmanuel G<br />
Does the demo prompt you for GPS access? If not you may either have location services turned off for Safari. Settings &gt; General &gt; Location Services, make sure that toggle switch is on. Another reason why it might not be working is if you have denied access to the request before. You&#8217;ll possibly need to reset location warnings to get prompted again, Settings &gt; General &gt; Reset.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Emmanuel Garcia</title>
		<link>http://www.thecssninja.com/javascript/geolocation-iphone/comment-page-1#comment-2369</link>
		<dc:creator>Emmanuel Garcia</dc:creator>
		<pubDate>Sat, 22 Jan 2011 21:44:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.thecssninja.com/?p=287#comment-2369</guid>
		<description>When I use the &quot;View a live demo&quot; button from my iPhone 3Gs, I get the Apple Inc.&#039;s headquarters shown, not my current location. Any suggestions?</description>
		<content:encoded><![CDATA[<p>When I use the &#8220;View a live demo&#8221; button from my iPhone 3Gs, I get the Apple Inc.&#8217;s headquarters shown, not my current location. Any suggestions?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: The Css Ninja</title>
		<link>http://www.thecssninja.com/javascript/geolocation-iphone/comment-page-1#comment-2244</link>
		<dc:creator>The Css Ninja</dc:creator>
		<pubDate>Wed, 24 Nov 2010 03:06:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.thecssninja.com/?p=287#comment-2244</guid>
		<description>There can be many factors why it could be slow. Set a timeout value so say after 3 seconds it will trigger the error callback and in the callback you can trigger the getPosition call again e.g. 

&lt;pre lang=&quot;javascript&quot;&gt;
navigator.geolocation.getCurrentPosition(success, fail,
    {timeout: 3000});

function fail(e) {
    // Try again
    if(e.TIMEOUT) {
       navigator.geolocation.getCurrentPosition(success, fail,
          {timeout: 3000});
    } else {
        // Failed for some other reason
    }
}
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>There can be many factors why it could be slow. Set a timeout value so say after 3 seconds it will trigger the error callback and in the callback you can trigger the getPosition call again e.g.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript javascript" style="font-family:monospace;">navigator.<span style="color: #660066;">geolocation</span>.<span style="color: #660066;">getCurrentPosition</span><span style="color: #009900;">&#40;</span>success<span style="color: #339933;">,</span> fail<span style="color: #339933;">,</span>
    <span style="color: #009900;">&#123;</span>timeout<span style="color: #339933;">:</span> <span style="color: #CC0000;">3000</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span>;
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> fail<span style="color: #009900;">&#40;</span>e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #006600; font-style: italic;">// Try again</span>
    <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>e.<span style="color: #660066;">TIMEOUT</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
       navigator.<span style="color: #660066;">geolocation</span>.<span style="color: #660066;">getCurrentPosition</span><span style="color: #009900;">&#40;</span>success<span style="color: #339933;">,</span> fail<span style="color: #339933;">,</span>
          <span style="color: #009900;">&#123;</span>timeout<span style="color: #339933;">:</span> <span style="color: #CC0000;">3000</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span>;
    <span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #006600; font-style: italic;">// Failed for some other reason</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

]]></content:encoded>
	</item>
	<item>
		<title>By: Lakeside Slacker</title>
		<link>http://www.thecssninja.com/javascript/geolocation-iphone/comment-page-1#comment-2243</link>
		<dc:creator>Lakeside Slacker</dc:creator>
		<pubDate>Wed, 24 Nov 2010 00:32:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.thecssninja.com/?p=287#comment-2243</guid>
		<description>Hey All and especially Ninja,

navigator.geolocation.getCurrentPosition(success, fail);

This call is very slow and may sometimes fail on Safari.  Works pretty well on Chrome, Firefox and Opera.  

Do you know anything about this?

Lakeside</description>
		<content:encoded><![CDATA[<p>Hey All and especially Ninja,</p>
<p>navigator.geolocation.getCurrentPosition(success, fail);</p>
<p>This call is very slow and may sometimes fail on Safari.  Works pretty well on Chrome, Firefox and Opera.  </p>
<p>Do you know anything about this?</p>
<p>Lakeside</p>
]]></content:encoded>
	</item>
</channel>
</rss>

