Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Introduction to Geolocation
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Aaron Bassett
July 01, 2009
Technology
0
59
Introduction to Geolocation
Just after the Geolocation APIs were released I gave an introductory talk about them at Techmeetup
Aaron Bassett
July 01, 2009
Tweet
Share
More Decks by Aaron Bassett
See All by Aaron Bassett
When your wetware has too many threads - Tips from an ADHDer on how to improve your focus
aaronbassett
1
71
Stupid (and possibly illegal) stuff you can do with SMS, but probably shouldn't
aaronbassett
0
370
Hello to the World in 8 Web Frameworks (Micro, Batteries Included & Async)
aaronbassett
0
67
When The __future__ Becomes The Present; Dropping Python 2 Support In A Commercial Client
aaronbassett
1
84
Real-time transcription and sentiment analysis of audio streams; on the phone and in the browser
aaronbassett
0
85
Django and the testing pyramid - DjangoCon Europe 2017
aaronbassett
0
920
Avoiding the "left-pad" problem: How to secure your pip install process
aaronbassett
0
380
Sun, Sea & Pi - A Raspberry Pi day talk
aaronbassett
0
130
Having fun with testing
aaronbassett
0
82
Other Decks in Technology
See All in Technology
ZOZOにおけるAI活用の現在 ~開発組織全体での取り組みと試行錯誤~
zozotech
PRO
5
5.7k
Introduction to Bill One Development Engineer
sansan33
PRO
0
360
Bill One 開発エンジニア 紹介資料
sansan33
PRO
5
17k
日本の85%が使う公共SaaSは、どう育ったのか
taketakekaho
1
220
モダンUIでフルサーバーレスなAIエージェントをAmplifyとCDKでサクッとデプロイしよう
minorun365
4
210
コスト削減から「セキュリティと利便性」を担うプラットフォームへ
sansantech
PRO
3
1.5k
10Xにおける品質保証活動の全体像と改善 #no_more_wait_for_test
nihonbuson
PRO
2
300
Agent Skils
dip_tech
PRO
0
100
ブロックテーマ、WordPress でウェブサイトをつくるということ / 2026.02.07 Gifu WordPress Meetup
torounit
0
190
配列に見る bash と zsh の違い
kazzpapa3
3
160
Context Engineeringの取り組み
nutslove
0
360
SRE Enabling戦記 - 急成長する組織にSREを浸透させる戦いの歴史
markie1009
0
120
Featured
See All Featured
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
78
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
0
3.4k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.4k
Designing for humans not robots
tammielis
254
26k
Rails Girls Zürich Keynote
gr2m
96
14k
Context Engineering - Making Every Token Count
addyosmani
9
660
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
55
How to build a perfect <img>
jonoalderson
1
4.9k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
910
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
2.1k
Test your architecture with Archunit
thirion
1
2.2k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
270
Transcript
Geolocation
Aaron Bassett aaronbassett.com twitter.com/aaronbassett
“Geolocation is the identification of the real-world geographic location of
an Internet-connected computer, mobile device, website visitor or other.” Wikipedia
Devices
Geolocation API
Privacy Have to give permission Can alter accuracy Might reject
you Be trustworthy
http://bit.ly/please-work
<header> <hgroup> <h1>Geolocation Demo</h1> <h2>for <a href='http://techmeetup.co.uk/blog/2009/11/announcing-techmeetup-glasgow-7/'> Glasgow Tech Meetup</a></h2>
</hgroup> </header> <div id='map'> <p><small><!-- map goes here --></small></p> </div> <p id='message'><strong>Status:</strong> <em id='status'>waiting...</em></p> <footer> <p><a href='https://github.com/aaronbassett/TMU-Geolocation'>download source from Github</a></p> </footer> <script type='text/javascript'> function success(position) { var s = document.getElementById('status'); if (s.className == 'success') { // not sure why we're hitting this twice in FF, // I think it's to do with a cached result coming back return; } s.innerHTML = "found you!"; s.className = 'success'; var latlng = new google.maps.LatLng(position.coords.latitude, position.coords.longitude); var myOptions = { zoom: 15, center: latlng, mapTypeControl: false, navigationControlOptions: {style: google.maps.NavigationControlStyle.SMALL}, mapTypeId: google.maps.MapTypeId.ROADMAP }; var map = new google.maps.Map(document.getElementById("map"), myOptions); var marker = new google.maps.Marker({ position: latlng, map: map, title:"You are here!" }); } function error(msg) { var s = document.getElementById('status'); s.innerHTML = typeof msg == 'string' ? msg : "failed"; s.className = 'error'; } if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(success, error); } else { error('not supported'); } </script>
Example function success(pos) { alert(pos.coords.latitude+" : "+pos.coords.longitude); } function error(msg)
{ msg = (typeof msg == 'string') ? msg : "couldn't find you :("; alert(msg); } if(navigator.geolocation) { navigator.geolocation.getCurrentPosition(success, error); } else { error('not supported'); }
/* GeoFill by Christian Heilmann Version: 1.1 Homepage: http://icant.co.uk/geofill Copyright
(c) 2009, Christian Heilmann Code licensed under the BSD License */
In the wild
What not to do
github.com/aaronbassett/TMU- Geolocation
Thank you for listening no hard questions, plzkthnx!