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
20250705 Headlamp: 專注可擴展性的 Kubernetes 用戶界面
pichuang
0
270
AWS Organizations 新機能!マルチパーティ承認の紹介
yhana
1
280
「クラウドコスト絶対削減」を支える技術—FinOpsを超えた徹底的なクラウドコスト削減の実践論
delta_tech
4
170
マーケットプレイス版Oracle WebCenter Content For OCI
oracle4engineer
PRO
3
960
KubeCon + CloudNativeCon Japan 2025 Recap Opening & Choose Your Own Adventureシリーズまとめ
mmmatsuda
0
280
インフラ寄りSREの生存戦略
sansantech
PRO
0
170
ビズリーチにおけるリアーキテクティング実践事例 / JJUG CCC 2025 Spring
visional_engineering_and_design
1
130
成長し続けるアプリのためのテストと設計の関係、そして意思決定の記録。
sansantech
PRO
0
120
Zero Data Loss Autonomous Recovery Service サービス概要
oracle4engineer
PRO
2
7.8k
ビギナーであり続ける/beginning
ikuodanaka
3
760
LangSmith×Webhook連携で実現するプロンプトドリブンCI/CD
sergicalsix
1
240
NewSQLや分散データベースを支えるRaftの仕組み - 仕組みを理解して知る得意不得意
hacomono
PRO
3
170
Featured
See All Featured
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.9k
How to Think Like a Performance Engineer
csswizardry
25
1.7k
Intergalactic Javascript Robots from Outer Space
tanoku
271
27k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
The Power of CSS Pseudo Elements
geoffreycrofte
77
5.9k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
181
54k
Writing Fast Ruby
sferik
628
62k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
6
300
Rebuilding a faster, lazier Slack
samanthasiow
82
9.1k
A Tale of Four Properties
chriscoyier
160
23k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
2.9k
Visualization
eitanlees
146
16k
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!