<?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>Squio.blog &#187; Geolocation API</title>
	<atom:link href="http://squio.nl/blog/tag/geolocation-api/feed/" rel="self" type="application/rss+xml" />
	<link>http://squio.nl</link>
	<description>Creative internet development</description>
	<lastBuildDate>Thu, 03 Jun 2010 07:35:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/>		<item>
		<title>Firefox 3.5 does geolocation!</title>
		<link>http://squio.nl/blog/2009/06/09/firefox-35-does-geolocation/</link>
		<comments>http://squio.nl/blog/2009/06/09/firefox-35-does-geolocation/#comments</comments>
		<pubDate>Tue, 09 Jun 2009 13:41:54 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[firefox]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[Firefox 3.5]]></category>
		<category><![CDATA[Geolocation]]></category>
		<category><![CDATA[Geolocation API]]></category>
		<category><![CDATA[Google Gears]]></category>
		<category><![CDATA[GPS]]></category>
		<category><![CDATA[Maps API]]></category>
		<category><![CDATA[Mozilla Firefox]]></category>

		<guid isPermaLink="false">http://squio.nl/blog/?p=356</guid>
		<description><![CDATA[Image by KonMan via Flickr Since early beta release of Firefox 3.1 there is experimental support for the experimental W3C Geolocation API. Now Doug Turner, one of the engineers who is behind the Geolocation support in Firefox, wrote a nice background story geolocation in Firefox 3.5 (hacks.mozilla.org). A very interesting read, and it turns out [...]]]></description>
			<content:encoded><![CDATA[<div class="zemanta-img" style="margin: 1em; display: block;">
<div>
<dl class="wp-caption alignright" style="width: 250px;">
<dt class="wp-caption-dt"><a href="http://www.flickr.com/photos/76812253@N00/215867223"><img title="Firefox crop circle" src="http://farm1.static.flickr.com/72/215867223_031d80d4c3_m.jpg" alt="Firefox crop circle"></a></dt>
<dd class="wp-caption-dd zemanta-img-attribution" style="font-size: 0.8em;">Image by <a href="http://www.flickr.com/photos/76812253@N00/215867223">KonMan</a> via Flickr</dd>
</dl>
</div>
</div>
<p>Since early beta release of Firefox 3.1 there is experimental support for the experimental <a href="http://dev.w3.org/geo/api/spec-source.html">W3C Geolocation API</a>.</p>
<p>Now Doug Turner, one of the engineers who is behind the Geolocation support in Firefox, wrote a nice background story <a href="http://hacks.mozilla.org/2009/06/geolocation/">geolocation in Firefox 3.5</a> (hacks.mozilla.org). A very interesting read, and it turns out that geolocation is not only for mobile devices, but also available in regular Firefox versions, using wifi or IP address mapping.</p>
<p>Using Firefox 3.5 or another location aware browser? Give it a try by clicking the button below, a <a href="#map_canvas">map with your current location</a> will be loaded&#8230;</p>
<input onclick="getPosition();" value="Show my location..." type="button">
<p>Note:</p>
<ul>
<li>Firefox 3.5b4 has an <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=490046">annoying bug (#490046)</a> which lets you get your location only once per run.</li>
<li>Privacy is an issue, Firefox asks for permission by showing a notification bar on top of the screen. Click &#8220;Tell them&#8221; to proceed&#8230;
<p><img class="size-full wp-image-373 " title="location-notification" src="http://squio.nl/blog/wp-content/2009/06/location-notification.png" alt="Click &quot;tell Them&quot;..." height="37" width="369"></li>
</ul>
<p><script src="http://maps.google.com/maps?file=api&amp;v=2&amp;sensor=false&amp;key=ABQIAAAAvtM-3wbz7AiDMy291kdzZBRFqEeOhvAcuHhSGFpRouMth2UItBSi65zYtrc5qDooht3X7kynqH18mw" type="text/javascript"></script></p>
<div id="map_canvas" style="padding: 1em; width: 490px; height: 300px; background-color: silver;">Map your location&#8230;</div>
<p><script type="text/javascript"><!--
function getPosition() {
	if (navigator.geolocation) {
		try{
			document.getElementById('map_canvas').innerHTML = "Loading, please wait...";
			navigator.geolocation.getCurrentPosition(showPosition);
		} catch(e) {
			document.getElementById('map_canvas').innerHTML = "Exception: " + e;
		}
	} else {
		document.getElementById('map_canvas').innerHTML = "Your browser doesn't support the geolocation interface";
	}
}
function showPosition(position) {
	if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map_canvas"));
        map.setCenter(new GLatLng(position.coords.latitude, position.coords.longitude), 13);
        var point = new GLatLng(position.coords.latitude, position.coords.longitude);
        map.addOverlay(new GMarker(point));
		window.onunload = GUnload;
	} else {
		document.getElementById('map_canvas').innerHTML = 'Your browser seems unable to load Google Maps';
	}
}
// --></script></p>
<p>What the script does&#8230;</p>
<pre>// call native geolocation API:
navigator.geolocation.getCurrentPosition(callback);

// callback initializes a google map with the geo data:
function callback(position) {
    ...
    var point = new GLatLng(position.coords.latitude,
         position.coords.longitude);
    ...
}
</pre>
<p>Google provides a similar <a href="http://code.google.com/apis/gears/api_geolocation.html">Geolocation API implementation through Gears</a>.</p>
<p>Got another browser where the API works? Please leave a comment!</p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles by Zemanta</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://google-code-updates.blogspot.com/2009/04/google-location-services-now-in-mozilla.html"> Google Location Services now in Mozilla Firefox </a> (google-code-updates.blogspot.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.slideshare.net/rsarver/w3c-geolocation-api-making-websites-locationaware">W3C Geolocation API &#8211; Making Websites Location-aware</a> (slideshare.net)</li>
<li class="zemanta-article-ul-li"><a href="http://radar.oreilly.com/2009/05/new-geo-for-devs-from-google-i.html"> New Geo For Devs From Google I/O </a> (radar.oreilly.com)</li>
<li class="zemanta-article-ul-li"><a href="http://mashable.com/2009/03/26/opera-geolocation/">Opera, Now With Geolocation</a> (mashable.com)</li>
<li class="zemanta-article-ul-li"><a href="http://lifehacker.com/5235763/firefox-35-gets-geolocation-powered-by-google"> Firefox 3.5 Gets Geolocation, Powered by Google </a> (lifehacker.com)</li>
<li class="zemanta-article-ul-li"><a href="http://venturebeat.com/2009/04/30/google-and-mozilla-team-up-to-pinpoint-your-location/"> Google and Mozilla team up to pinpoint your location </a> (venturebeat.com)</li>
<li class="zemanta-article-ul-li"><a href="http://arstechnica.com/software/news/2009/03/location-awareness-spreads-to-opera-browser.ars">Location awareness spreads to Opera browser</a> (arstechnica.com)</li>
</ul>
<div style="margin-top: 10px; height: 15px;" class="zemanta-pixie"><a class="zemanta-pixie-a" href="http://reblog.zemanta.com/zemified/61ed241c-3cee-4fb0-8186-666c8e1ec536/" title="Reblog this post [with Zemanta]"><img style="border: medium none ; float: right;" class="zemanta-pixie-img" src="http://img.zemanta.com/reblog_e.png?x-id=61ed241c-3cee-4fb0-8186-666c8e1ec536" alt="Reblog this post [with Zemanta]"></a><span class="zem-script more-related pretty-attribution"><script type="text/javascript" src="http://static.zemanta.com/readside/loader.js" defer="defer"></script></span></div>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=Firefox+3.5+does+geolocation%21+http://squio.nl/?p=356" title="Post to Twitter"><img class="nothumb" src="http://squio.nl/blog/wp-content/plugins/tweet-this/icons/tt-twitter3.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/home/?status=Firefox+3.5+does+geolocation%21+http://squio.nl/?p=356" title="Post to Twitter">Tweet This</a> <a class="tt" href="http://delicious.com/post?url=http://squio.nl/blog/2009/06/09/firefox-35-does-geolocation/&amp;title=Firefox+3.5+does+geolocation%21" title="Post to Delicious"><img class="nothumb" src="http://squio.nl/blog/wp-content/plugins/tweet-this/icons/tt-delicious.png" alt="Post to Delicious" /></a> <a class="tt" href="http://delicious.com/post?url=http://squio.nl/blog/2009/06/09/firefox-35-does-geolocation/&amp;title=Firefox+3.5+does+geolocation%21" title="Post to Delicious">Delicious</a> <a class="tt" href="http://reddit.com/submit?url=http://squio.nl/blog/2009/06/09/firefox-35-does-geolocation/&amp;title=Firefox+3.5+does+geolocation%21" title="Post to Reddit"><img class="nothumb" src="http://squio.nl/blog/wp-content/plugins/tweet-this/icons/tt-reddit.png" alt="Post to Reddit" /></a> <a class="tt" href="http://reddit.com/submit?url=http://squio.nl/blog/2009/06/09/firefox-35-does-geolocation/&amp;title=Firefox+3.5+does+geolocation%21" title="Post to Reddit">Reddit This Post</a> <a class="tt" href="http://stumbleupon.com/submit?url=http://squio.nl/blog/2009/06/09/firefox-35-does-geolocation/&amp;title=Firefox+3.5+does+geolocation%21" title="Post to StumbleUpon"><img class="nothumb" src="http://squio.nl/blog/wp-content/plugins/tweet-this/icons/tt-su.png" alt="Post to StumbleUpon" /></a> <a class="tt" href="http://stumbleupon.com/submit?url=http://squio.nl/blog/2009/06/09/firefox-35-does-geolocation/&amp;title=Firefox+3.5+does+geolocation%21" title="Post to StumbleUpon">Stumble This Post</a></p><img src="http://squio.nl/blog/?ak_action=api_record_view&id=356&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://squio.nl/blog/2009/06/09/firefox-35-does-geolocation/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
