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
58
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
65
Stupid (and possibly illegal) stuff you can do with SMS, but probably shouldn't
aaronbassett
0
360
Hello to the World in 8 Web Frameworks (Micro, Batteries Included & Async)
aaronbassett
0
64
When The __future__ Becomes The Present; Dropping Python 2 Support In A Commercial Client
aaronbassett
1
82
Real-time transcription and sentiment analysis of audio streams; on the phone and in the browser
aaronbassett
0
84
Django and the testing pyramid - DjangoCon Europe 2017
aaronbassett
0
890
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
80
Other Decks in Technology
See All in Technology
M&Aで拡大し続けるGENDAのデータ活用を促すためのDatabricks権限管理 / AEON TECH HUB #22
genda
0
290
技術選定、下から見るか?横から見るか?
masakiokuda
0
170
Everything As Code
yosuke_ai
0
150
Knowledge Work の AI Backend
kworkdev
PRO
0
330
「駆動」って言葉、なんかカッコイイ_Mitz
comucal
PRO
0
120
AIBuildersDay_track_A_iidaxs
iidaxs
4
1.6k
ハッカソンから社内プロダクトへ AIエージェント「ko☆shi」開発で学んだ4つの重要要素
sonoda_mj
6
1.9k
業務の煩悩を祓うAI活用術108選 / AI 108 Usages
smartbank
9
17k
アラフォーおじさん、はじめてre:Inventに行く / A 40-Something Guy’s First re:Invent Adventure
kaminashi
0
190
AI との良い付き合い方を僕らは誰も知らない
asei
1
300
MySQLのSpatial(GIS)機能をもっと充実させたい ~ MyNA望年会2025LT
sakaik
0
160
"人"が頑張るAI駆動開発
yokomachi
1
650
Featured
See All Featured
Product Roadmaps are Hard
iamctodd
PRO
55
12k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
33
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
85
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
9.2k
Raft: Consensus for Rubyists
vanstee
141
7.3k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.2k
Automating Front-end Workflow
addyosmani
1371
200k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Building Adaptive Systems
keathley
44
2.9k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
240
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!