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
Aaron Bassett
July 01, 2009
Technology
0
57
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
61
Stupid (and possibly illegal) stuff you can do with SMS, but probably shouldn't
aaronbassett
0
350
Hello to the World in 8 Web Frameworks (Micro, Batteries Included & Async)
aaronbassett
0
63
When The __future__ Becomes The Present; Dropping Python 2 Support In A Commercial Client
aaronbassett
1
78
Real-time transcription and sentiment analysis of audio streams; on the phone and in the browser
aaronbassett
0
83
Django and the testing pyramid - DjangoCon Europe 2017
aaronbassett
0
880
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
77
Other Decks in Technology
See All in Technology
Android Studio Otter の最新 Gemini 機能 / Latest Gemini features in Android Studio Otter
yanzm
0
300
TypeScript 6.0で非推奨化されるオプションたち
uhyo
15
4.9k
AWS Media Services 最新サービスアップデート 2025
eijikominami
0
110
.NET 10のEntity Framework Coreの新機能
htkym
0
100
ローカルVLM OCRモデル + Gemini 3.0 Proで日本語性能を試す
gotalab555
1
130
ABEMAのCM配信を支えるスケーラブルな分散カウンタの実装
hono0130
4
1.1k
マルチドライブアーキテクチャ: 複数の駆動力でプロダクトを前進させる
knih
0
9.5k
IaC を使いたくないけどポリシー管理をどうにかしたい
kazzpapa3
1
150
組織の“見えない壁”を越えよ!エンタープライズシフトに必須な3つのPMの「在り方」変革 #pmconf2025
masakazu178
1
800
AI時代のインシデント対応 〜時代を切り抜ける、組織アーキテクチャ〜
jacopen
4
120
膨大なデータをどうさばく? Java × MQで作るPub/Subアーキテクチャ
zenta
0
120
"'TSのAPI型安全”の対価は誰が払う?不公平なスキーマ駆動に終止符を打つハイブリッド戦略
hal_spidernight
0
120
Featured
See All Featured
The Language of Interfaces
destraynor
162
25k
Balancing Empowerment & Direction
lara
5
760
Art, The Web, and Tiny UX
lynnandtonic
303
21k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.8k
Raft: Consensus for Rubyists
vanstee
140
7.2k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
127
54k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.8k
Making the Leap to Tech Lead
cromwellryan
135
9.6k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.6k
Building Adaptive Systems
keathley
44
2.8k
KATA
mclloyd
PRO
32
15k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
36
6.1k
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!