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
55
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
60
Stupid (and possibly illegal) stuff you can do with SMS, but probably shouldn't
aaronbassett
0
310
Hello to the World in 8 Web Frameworks (Micro, Batteries Included & Async)
aaronbassett
0
61
When The __future__ Becomes The Present; Dropping Python 2 Support In A Commercial Client
aaronbassett
1
71
Real-time transcription and sentiment analysis of audio streams; on the phone and in the browser
aaronbassett
0
82
Django and the testing pyramid - DjangoCon Europe 2017
aaronbassett
0
850
Avoiding the "left-pad" problem: How to secure your pip install process
aaronbassett
0
370
Sun, Sea & Pi - A Raspberry Pi day talk
aaronbassett
0
120
Having fun with testing
aaronbassett
0
73
Other Decks in Technology
See All in Technology
怖くない!はじめてのClaude Code
shinya337
0
400
AI専用のリンターを作る #yumemi_patch
bengo4com
5
4.3k
敢えて生成AIを使わないマネジメント業務
kzkmaeda
2
450
開発生産性を測る前にやるべきこと - 組織改善の実践 / Before Measuring Dev Productivity
kaonavi
10
4.6k
データグループにおけるフロントエンド開発
lycorptech_jp
PRO
1
100
Backlog ユーザー棚卸しRTA、多分これが一番早いと思います
__allllllllez__
1
150
AI時代の開発生産性を加速させるアーキテクチャ設計
plaidtech
PRO
3
160
スタートアップに選択肢を 〜生成AIを活用したセカンダリー事業への挑戦〜
nstock
0
200
事業成長の裏側:エンジニア組織と開発生産性の進化 / 20250703 Rinto Ikenoue
shift_evolve
PRO
2
22k
CDKTFについてざっくり理解する!!~CloudFormationからCDKTFへ変換するツールも作ってみた~
masakiokuda
1
150
DatabricksにOLTPデータベース『Lakebase』がやってきた!
inoutk
0
110
Geminiとv0による高速プロトタイピング
shinya337
1
270
Featured
See All Featured
Speed Design
sergeychernyshev
32
1k
Designing Experiences People Love
moore
142
24k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
233
17k
Six Lessons from altMBA
skipperchong
28
3.9k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
46
9.6k
Practical Orchestrator
shlominoach
189
11k
Scaling GitHub
holman
460
140k
Intergalactic Javascript Robots from Outer Space
tanoku
271
27k
Statistics for Hackers
jakevdp
799
220k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
161
15k
Music & Morning Musume
bryan
46
6.6k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
138
34k
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!