SlideShare una empresa de Scribd logo
1 de 75
HELLO
MAX WHEELER
   @makenosound
LOCATION,
 LOCATION,
GEOLOCATION
I KNOW WHERE
   YOU LIVE
What is

GEOLOCATION?
IT’S ABOUT
 CONTEXT
-35.282441,
149.125022
-33.87585,
151.20015
GEODESIC
CIVIC
Where On Earth IDentifiers

   WOEIDs
http://where.yahooapis.com/v1/place/28584769
HOW IT WORKS
GPS (or Assisted-
GPS)
Cellular network ID
WiFi networks
IP sniffing
GEOLOCATION API
“Is this that
HTML5 thing I’ve
 heard so much
    about?”
NO
But that’s OK
THE BASICS
navigator.geolocation
if
(!!navigator.geolocation)
{


//
Hooray!
}
if
(Modernizr.geolocation)
{

 //
Hooray!
}
.no‐geolocation
button
{

 display:
none
}
ONE-SHOT
 REQUEST
//
Success
callback
function
showMap(position)
{

 alert("I
see
you!");
}

//
Make
a
one‐off
position
request
navigator.geolocation.getCurrentPosition(showMap);
position
=
{


coords:
{




accuracy:
80,




altitude:
null,




altitudeAccuracy:
null,




heading:
null,




latitude:
‐35.28211547444445,




longitude:
149.12501867666666,




speed:
null


},


timestamp:
307770135
}
position
=
{


coords:
{




accuracy:
80,















 
 //
in
metres




altitude:
null,













 
 //
in
metres




altitudeAccuracy:
null,





 
 //
in
metres




heading:
null,

 
 
 
 
 
 //
0‐360°
                    





latitude:
‐35.28211547444445,


//
decimal
°




longitude:
149.12501867666666,

//
decimal
°




speed:
null
 
 
 
 


//
metres
per
second


},


timestamp:
307770135
}
//
Success
callback
function
showMap(position)
{

 alert("I
see
you!");
}

//
Error
callback
function
handleError(error)
{

 alert("Oh
noes!");
}

//
Make
a
one‐off
position
request
navigator.geolocation.getCurrentPosition(

 showMap,

 handleError
);
error
=
{

 code:




1,

 message:

"User
says
no."
}

0:
UNKNOWN_ERROR
1:
PERMISSION_DENIED
2:
POSITION_UNAVAILABLE
3:
TIMEOUT
//
Success
callback
function
showMap(position)
{

 console.log(position);
}

//
Error
callback
function
handleError(error)
{

 if(error.code
==
1)
{

 
 //
Fallback
to
other
option?

 }
}

//
Make
a
one‐off
position
request
navigator.geolocation.getCurrentPosition(

 showMap,

 handleError
);
navigator.geolocation.getCurrentPosition(

 showMap,

 handleError,

 {






enableHighAccuracy:
false,

//
boolean






timeout:











10000,


//
in
milliseconds






maximumAge:








60000


//
in
milliseconds

 }
);
navigator.geolocation.getCurrentPosition(

 showMap,

 handleError,

 {

 
 maximumAge:
Infinity,

 
 timeout:



0

 }
);
//
Success
callback
function
showMap(position)
{


//
Thresholds
for
accuracy
and
the
freshness


var
earliest
=
Date.now()
‐
60000;


var
accuracy
=
100;


if(position.timeout
>
earliest
&&
accuracy
>
position.coords.accuracy)
{




//
We're
good,
do
the
things
we
want!


}
else
{




//
Initiate
a
new
position
request




navigator.geolocation.getCurrentPosition(showMap,
handleError,
{






maximumAge:
0,






timeout:



10000




});


}
}

navigator.geolocation.getCurrentPosition(showMap,
handleError,

   {

   
   maximumAge:
Infinity,

   
   timeout:



0

   }
);
WATCHING
//
Success
callback
function
showMap(position)
{

 //
Hooray!
}

//
Error
callback
function
handleError(error)
{

 //
Sad
face
:(
}

//
Start
watching
the
user’s
location
navigator.geolocation.watchPosition(

 showMap,

 handleError
);
//
Success
callback
function
showMap(position)
{


//
Check
the
accuracy


if
(position.coords.accuracy
<
100)



{




//
We're
happy
with
the
position,
so
stop
watching




navigator.geolocation.clearWatch(watcher);


}
}

//
Start
watching
the
users'
location
var
watcher
=
navigator.geolocation.watchPosition(showMap);
WHAT NOW?
MAKE IT
MEANINGFUL
REVERSE
GEOCODING
http://tinygeocoder.com/

http://code.google.com/apis/maps/documentation/geocoding/

http://developer.yahoo.com/geo/placefinder
<script

 src='http://maps.google.com/maps/api/js?sensor=false'>
</script>


<script>


   var
geocoder
=
new
google.maps.Geocoder();


   geocoder.geocode(

   

{
location:
new
google.maps.LatLng(lat,
lng)
},

   

callBack

   );


   function
callback(response,
status)
{
};

</script>
DEMO
GEOCODING
<script

 src='http://maps.google.com/maps/api/js?sensor=false'>
</script>


<script>


   var
geocoder
=
new
google.maps.Geocoder();


   geocoder.geocode(

   

{
address:
"Sydney
Convention
Centre"
},

   

callBack

   );


   function
callback(response,
status)
{
};

</script>
YQLGEO
    A wrapper for Geolocation services

http://isithackday.com/hacks/geo/yql‐geo‐library/
BULLETPROOF
A USE CASE
IT’S ABOUT
INFORMATION
1. Which cafés are
good?
2. Where are they?
3. In relation to me?
MAPS ARE
A BIG STICK
1. Simple
2. Fast
3. Intelligent
1. Which are good?
2. Where are they?
3. In relation to me?
DEMO
MAPS ARE GOOD
SIMPLE MAPS
STANDARD MAPS
“With great power
  comes great
 responsibility”
THANKS
@MAKENOSOUND

Más contenido relacionado

Destacado

HTML5 Geolocation API
HTML5 Geolocation APIHTML5 Geolocation API
HTML5 Geolocation APIFilip Mares
 
Wireless Geolocation
Wireless GeolocationWireless Geolocation
Wireless GeolocationFatema Zohora
 
Cci 92 - Club Nelson - Dentsu Aegis Network - Géolocalisation et point de ven...
Cci 92 - Club Nelson - Dentsu Aegis Network - Géolocalisation et point de ven...Cci 92 - Club Nelson - Dentsu Aegis Network - Géolocalisation et point de ven...
Cci 92 - Club Nelson - Dentsu Aegis Network - Géolocalisation et point de ven...Club Nelson - CCI des Hauts-de-Seine
 
Modeling objects interaction via UML sequence diagrams [Software Modeling] [...
Modeling objects interaction via UML sequence diagrams  [Software Modeling] [...Modeling objects interaction via UML sequence diagrams  [Software Modeling] [...
Modeling objects interaction via UML sequence diagrams [Software Modeling] [...Ivano Malavolta
 
Download presentation
Download presentationDownload presentation
Download presentationwebhostingguy
 
5G MOBILE TECHNOLOGY PPT
5G MOBILE TECHNOLOGY PPT5G MOBILE TECHNOLOGY PPT
5G MOBILE TECHNOLOGY PPTpriyanka reddy
 
Slideshare Powerpoint presentation
Slideshare Powerpoint presentationSlideshare Powerpoint presentation
Slideshare Powerpoint presentationelliehood
 

Destacado (9)

HTML5 Geolocation API
HTML5 Geolocation APIHTML5 Geolocation API
HTML5 Geolocation API
 
Wireless Geolocation
Wireless GeolocationWireless Geolocation
Wireless Geolocation
 
Cci 92 - Club Nelson - Dentsu Aegis Network - Géolocalisation et point de ven...
Cci 92 - Club Nelson - Dentsu Aegis Network - Géolocalisation et point de ven...Cci 92 - Club Nelson - Dentsu Aegis Network - Géolocalisation et point de ven...
Cci 92 - Club Nelson - Dentsu Aegis Network - Géolocalisation et point de ven...
 
Modeling objects interaction via UML sequence diagrams [Software Modeling] [...
Modeling objects interaction via UML sequence diagrams  [Software Modeling] [...Modeling objects interaction via UML sequence diagrams  [Software Modeling] [...
Modeling objects interaction via UML sequence diagrams [Software Modeling] [...
 
Download presentation
Download presentationDownload presentation
Download presentation
 
5g ppt new
5g ppt new5g ppt new
5g ppt new
 
5G MOBILE TECHNOLOGY PPT
5G MOBILE TECHNOLOGY PPT5G MOBILE TECHNOLOGY PPT
5G MOBILE TECHNOLOGY PPT
 
Slideshare Powerpoint presentation
Slideshare Powerpoint presentationSlideshare Powerpoint presentation
Slideshare Powerpoint presentation
 
Slideshare ppt
Slideshare pptSlideshare ppt
Slideshare ppt
 

Último

SCRIP Lua HTTP PROGRACMACION PLC WECON CA
SCRIP Lua HTTP PROGRACMACION PLC  WECON CASCRIP Lua HTTP PROGRACMACION PLC  WECON CA
SCRIP Lua HTTP PROGRACMACION PLC WECON CANestorGamez6
 
VIP Call Girls Service Bhagyanagar Hyderabad Call +91-8250192130
VIP Call Girls Service Bhagyanagar Hyderabad Call +91-8250192130VIP Call Girls Service Bhagyanagar Hyderabad Call +91-8250192130
VIP Call Girls Service Bhagyanagar Hyderabad Call +91-8250192130Suhani Kapoor
 
VIP Russian Call Girls in Saharanpur Deepika 8250192130 Independent Escort Se...
VIP Russian Call Girls in Saharanpur Deepika 8250192130 Independent Escort Se...VIP Russian Call Girls in Saharanpur Deepika 8250192130 Independent Escort Se...
VIP Russian Call Girls in Saharanpur Deepika 8250192130 Independent Escort Se...Suhani Kapoor
 
VIP Call Girls Service Mehdipatnam Hyderabad Call +91-8250192130
VIP Call Girls Service Mehdipatnam Hyderabad Call +91-8250192130VIP Call Girls Service Mehdipatnam Hyderabad Call +91-8250192130
VIP Call Girls Service Mehdipatnam Hyderabad Call +91-8250192130Suhani Kapoor
 
Fashion trends before and after covid.pptx
Fashion trends before and after covid.pptxFashion trends before and after covid.pptx
Fashion trends before and after covid.pptxVanshNarang19
 
Recommendable # 971589162217 # philippine Young Call Girls in Dubai By Marina...
Recommendable # 971589162217 # philippine Young Call Girls in Dubai By Marina...Recommendable # 971589162217 # philippine Young Call Girls in Dubai By Marina...
Recommendable # 971589162217 # philippine Young Call Girls in Dubai By Marina...home
 
VIP Russian Call Girls in Gorakhpur Deepika 8250192130 Independent Escort Ser...
VIP Russian Call Girls in Gorakhpur Deepika 8250192130 Independent Escort Ser...VIP Russian Call Girls in Gorakhpur Deepika 8250192130 Independent Escort Ser...
VIP Russian Call Girls in Gorakhpur Deepika 8250192130 Independent Escort Ser...Suhani Kapoor
 
Editorial design Magazine design project.pdf
Editorial design Magazine design project.pdfEditorial design Magazine design project.pdf
Editorial design Magazine design project.pdftbatkhuu1
 
Best VIP Call Girls Noida Sector 47 Call Me: 8448380779
Best VIP Call Girls Noida Sector 47 Call Me: 8448380779Best VIP Call Girls Noida Sector 47 Call Me: 8448380779
Best VIP Call Girls Noida Sector 47 Call Me: 8448380779Delhi Call girls
 
Cheap Rate Call girls Malviya Nagar 9205541914 shot 1500 night
Cheap Rate Call girls Malviya Nagar 9205541914 shot 1500 nightCheap Rate Call girls Malviya Nagar 9205541914 shot 1500 night
Cheap Rate Call girls Malviya Nagar 9205541914 shot 1500 nightDelhi Call girls
 
Kindergarten Assessment Questions Via LessonUp
Kindergarten Assessment Questions Via LessonUpKindergarten Assessment Questions Via LessonUp
Kindergarten Assessment Questions Via LessonUpmainac1
 
Cosumer Willingness to Pay for Sustainable Bricks
Cosumer Willingness to Pay for Sustainable BricksCosumer Willingness to Pay for Sustainable Bricks
Cosumer Willingness to Pay for Sustainable Bricksabhishekparmar618
 
VIP Call Girl Amravati Aashi 8250192130 Independent Escort Service Amravati
VIP Call Girl Amravati Aashi 8250192130 Independent Escort Service AmravatiVIP Call Girl Amravati Aashi 8250192130 Independent Escort Service Amravati
VIP Call Girl Amravati Aashi 8250192130 Independent Escort Service AmravatiSuhani Kapoor
 
Cheap Rate Call girls Kalkaji 9205541914 shot 1500 night
Cheap Rate Call girls Kalkaji 9205541914 shot 1500 nightCheap Rate Call girls Kalkaji 9205541914 shot 1500 night
Cheap Rate Call girls Kalkaji 9205541914 shot 1500 nightDelhi Call girls
 
VIP Call Girls Service Kukatpally Hyderabad Call +91-8250192130
VIP Call Girls Service Kukatpally Hyderabad Call +91-8250192130VIP Call Girls Service Kukatpally Hyderabad Call +91-8250192130
VIP Call Girls Service Kukatpally Hyderabad Call +91-8250192130Suhani Kapoor
 
Kala jadu for love marriage | Real amil baba | Famous amil baba | kala jadu n...
Kala jadu for love marriage | Real amil baba | Famous amil baba | kala jadu n...Kala jadu for love marriage | Real amil baba | Famous amil baba | kala jadu n...
Kala jadu for love marriage | Real amil baba | Famous amil baba | kala jadu n...babafaisel
 
Cheap Rate ➥8448380779 ▻Call Girls In Huda City Centre Gurgaon
Cheap Rate ➥8448380779 ▻Call Girls In Huda City Centre GurgaonCheap Rate ➥8448380779 ▻Call Girls In Huda City Centre Gurgaon
Cheap Rate ➥8448380779 ▻Call Girls In Huda City Centre GurgaonDelhi Call girls
 
NO1 Trending kala jadu Love Marriage Black Magic Punjab Powerful Black Magic ...
NO1 Trending kala jadu Love Marriage Black Magic Punjab Powerful Black Magic ...NO1 Trending kala jadu Love Marriage Black Magic Punjab Powerful Black Magic ...
NO1 Trending kala jadu Love Marriage Black Magic Punjab Powerful Black Magic ...Amil baba
 

Último (20)

SCRIP Lua HTTP PROGRACMACION PLC WECON CA
SCRIP Lua HTTP PROGRACMACION PLC  WECON CASCRIP Lua HTTP PROGRACMACION PLC  WECON CA
SCRIP Lua HTTP PROGRACMACION PLC WECON CA
 
VIP Call Girls Service Bhagyanagar Hyderabad Call +91-8250192130
VIP Call Girls Service Bhagyanagar Hyderabad Call +91-8250192130VIP Call Girls Service Bhagyanagar Hyderabad Call +91-8250192130
VIP Call Girls Service Bhagyanagar Hyderabad Call +91-8250192130
 
VIP Russian Call Girls in Saharanpur Deepika 8250192130 Independent Escort Se...
VIP Russian Call Girls in Saharanpur Deepika 8250192130 Independent Escort Se...VIP Russian Call Girls in Saharanpur Deepika 8250192130 Independent Escort Se...
VIP Russian Call Girls in Saharanpur Deepika 8250192130 Independent Escort Se...
 
VIP Call Girls Service Mehdipatnam Hyderabad Call +91-8250192130
VIP Call Girls Service Mehdipatnam Hyderabad Call +91-8250192130VIP Call Girls Service Mehdipatnam Hyderabad Call +91-8250192130
VIP Call Girls Service Mehdipatnam Hyderabad Call +91-8250192130
 
Fashion trends before and after covid.pptx
Fashion trends before and after covid.pptxFashion trends before and after covid.pptx
Fashion trends before and after covid.pptx
 
Recommendable # 971589162217 # philippine Young Call Girls in Dubai By Marina...
Recommendable # 971589162217 # philippine Young Call Girls in Dubai By Marina...Recommendable # 971589162217 # philippine Young Call Girls in Dubai By Marina...
Recommendable # 971589162217 # philippine Young Call Girls in Dubai By Marina...
 
VIP Russian Call Girls in Gorakhpur Deepika 8250192130 Independent Escort Ser...
VIP Russian Call Girls in Gorakhpur Deepika 8250192130 Independent Escort Ser...VIP Russian Call Girls in Gorakhpur Deepika 8250192130 Independent Escort Ser...
VIP Russian Call Girls in Gorakhpur Deepika 8250192130 Independent Escort Ser...
 
Editorial design Magazine design project.pdf
Editorial design Magazine design project.pdfEditorial design Magazine design project.pdf
Editorial design Magazine design project.pdf
 
Best VIP Call Girls Noida Sector 47 Call Me: 8448380779
Best VIP Call Girls Noida Sector 47 Call Me: 8448380779Best VIP Call Girls Noida Sector 47 Call Me: 8448380779
Best VIP Call Girls Noida Sector 47 Call Me: 8448380779
 
B. Smith. (Architectural Portfolio.).pdf
B. Smith. (Architectural Portfolio.).pdfB. Smith. (Architectural Portfolio.).pdf
B. Smith. (Architectural Portfolio.).pdf
 
Cheap Rate Call girls Malviya Nagar 9205541914 shot 1500 night
Cheap Rate Call girls Malviya Nagar 9205541914 shot 1500 nightCheap Rate Call girls Malviya Nagar 9205541914 shot 1500 night
Cheap Rate Call girls Malviya Nagar 9205541914 shot 1500 night
 
Kindergarten Assessment Questions Via LessonUp
Kindergarten Assessment Questions Via LessonUpKindergarten Assessment Questions Via LessonUp
Kindergarten Assessment Questions Via LessonUp
 
Cosumer Willingness to Pay for Sustainable Bricks
Cosumer Willingness to Pay for Sustainable BricksCosumer Willingness to Pay for Sustainable Bricks
Cosumer Willingness to Pay for Sustainable Bricks
 
VIP Call Girl Amravati Aashi 8250192130 Independent Escort Service Amravati
VIP Call Girl Amravati Aashi 8250192130 Independent Escort Service AmravatiVIP Call Girl Amravati Aashi 8250192130 Independent Escort Service Amravati
VIP Call Girl Amravati Aashi 8250192130 Independent Escort Service Amravati
 
Cheap Rate Call girls Kalkaji 9205541914 shot 1500 night
Cheap Rate Call girls Kalkaji 9205541914 shot 1500 nightCheap Rate Call girls Kalkaji 9205541914 shot 1500 night
Cheap Rate Call girls Kalkaji 9205541914 shot 1500 night
 
VIP Call Girls Service Kukatpally Hyderabad Call +91-8250192130
VIP Call Girls Service Kukatpally Hyderabad Call +91-8250192130VIP Call Girls Service Kukatpally Hyderabad Call +91-8250192130
VIP Call Girls Service Kukatpally Hyderabad Call +91-8250192130
 
Kala jadu for love marriage | Real amil baba | Famous amil baba | kala jadu n...
Kala jadu for love marriage | Real amil baba | Famous amil baba | kala jadu n...Kala jadu for love marriage | Real amil baba | Famous amil baba | kala jadu n...
Kala jadu for love marriage | Real amil baba | Famous amil baba | kala jadu n...
 
escort service sasti (*~Call Girls in Prasad Nagar Metro❤️9953056974
escort service sasti (*~Call Girls in Prasad Nagar Metro❤️9953056974escort service sasti (*~Call Girls in Prasad Nagar Metro❤️9953056974
escort service sasti (*~Call Girls in Prasad Nagar Metro❤️9953056974
 
Cheap Rate ➥8448380779 ▻Call Girls In Huda City Centre Gurgaon
Cheap Rate ➥8448380779 ▻Call Girls In Huda City Centre GurgaonCheap Rate ➥8448380779 ▻Call Girls In Huda City Centre Gurgaon
Cheap Rate ➥8448380779 ▻Call Girls In Huda City Centre Gurgaon
 
NO1 Trending kala jadu Love Marriage Black Magic Punjab Powerful Black Magic ...
NO1 Trending kala jadu Love Marriage Black Magic Punjab Powerful Black Magic ...NO1 Trending kala jadu Love Marriage Black Magic Punjab Powerful Black Magic ...
NO1 Trending kala jadu Love Marriage Black Magic Punjab Powerful Black Magic ...
 

Location, location, geolocation