Location.Aware

How To Build Apps That Are Smarter
Using Yahoo! Geo Technologies





Sourav Chakraborty


WHERE

What's Around

How To Go There?

MAPS

Beyond Maps


Typical Questions

Where?

What's Happening Here?

What's Around?

When?

Who?

Meta?

Current Location


Ask

Sniff

Infer


ASK THE USER

ASK THE BROWSER



ASK THE BROWSER

ASK THE BROWSER


W3C Geolocation API

navigator.geolocation.getCurrentPosition(function(position)
{
	console.log(
	'Your Coordinates are ’ 
	+
	position.coords.latitude
	+ ' & ’ +
	position.coords.longitude
	);
});

SNIFF


IP SNIFFING


http://isithackday.com/hacks/geo/js-location.html

IP SNIFFING

<script type="text/javascript"
src="http://j.maxmind.com/app/geoip.js">
</script>

geoip_latitude
geoip_longitude
geoip_city
geoip_region
geoip_region_name
geoip_postal_code
geoip_country_code
geoip_country_name 

INFER


Query



Too Much Trouble?

Too Many Moving Parts?

Too Many Apis?

YQL

GEOCODING

select * from geo.placefinder where text = "iit hyderabad"
<latitude>17.34725</latitude>
<longitude>78.428177</longitude>
<city>Hyderabad</city>
<county>Hyderabad</county>
<state>Andhra Pradesh</state>
<country>India</country>
<countrycode>IN</countrycode>
<statecode>AP</statecode>
<countycode/>
<uzip>500064</uzip>
<woeid>2295414</woeid>

Reverse Geocoding

select * from geo.placefinder where text="37.416275,-122.025092"
and gflags="R"
<line1>718 1st Ave</line1>
<line2>Sunnyvale, CA 94089</line2>
<line3/>
<line4>United States</line4>
<house>718</house>
<street>1st Ave</street>
<postal>94089</postal>
<city>Sunnyvale</city>
<county>Santa Clara</county>
<state>California</state>
<country>United States</country>
<countrycode>US</countrycode>
<statecode>CA</statecode>
<uzip>94089</uzip>
<hash>23370B9241162954</hash>
<woeid>12797150</woeid>
<woetype>11</woetype>

WOEID

Where On Earth ID


WOEID

http://where.yahooapis.com/v1/places.q('hitech city')?appid=xyz
<place yahoo:uri="http://where.yahooapis.com/v1/place/55924382" xml:lang="en-US">
<woeid>55924382</woeid>
<placeTypeName code="22">Suburb</placeTypeName>
<name>Hitech City</name>
<country type="Country" code="IN" woeid="23424848">India</country>
<admin1 type="State" code="IN-AP" woeid="2345740">Andhra Pradesh</admin1>
<admin2 type="District" code="" woeid="12586344">Rangareddi</admin2>
<admin3/>
<locality1 type="Town" woeid="2295414">Hyderabad</locality1>
<locality2 type="Suburb" woeid="55924382">Hitech City</locality2>

WOEID

http://where.yahooapis.com/v1/place/55924382?appid=xyz&format=json
{
"place": {
"woeid": 55924382,
"placeTypeName": "Suburb",
"placeTypeName attrs": {
"code": 22
},
"name": "Hitech City",
"country": "India",
"country attrs": {
"type": "Country",
"code": "IN",
"woeid": 23424848
},
"locality2": "Hitech City",
"locality2 attrs": {
"type": "Suburb",
"woeid": 55924382
},
"postal": "",
"centroid": {
"latitude": 17.43684,
"longitude": 78.37886
},
"boundingBox": {
"southWest": {
"latitude": 17.414539,
"longitude": 78.361282
},
"northEast": {
"latitude": 17.459141,
"longitude": 78.396446
}
},
"areaRank": 2,
"popRank": 0,
"uri": "http://where.yahooapis.com/v1/place/55924382",
"lang": "en-US"
}
}

Yahoo! GeoPlanet

http://developer.yahoo.com/geo/geoplanet/ 


Yahoo! GeoPlanet


geo.places.ancestors
geo.places.belongtos
geo.places.children
geo.places.common
geo.places.descendants
geo.places.neighbors
geo.places.parent
geo.places.siblings

GeoPlanet Explorer

http://isithackday.com/geoplanet-explorer/

geo.placemaker

SELECT * FROM geo.placemaker WHERE documentContent = 
"While Deepika is from Bangalore, Bipasha is from Kolkata 
they predominantly act in movies made in Mumbai"
AND documentType="text/plain"
<matches>
<match>
<place xmlns="http://wherein.yahooapis.com/v1/schema">
<woeId>2295420</woeId>
<type>Town</type>
<name><![CDATA[Bangalore, Karnataka, IN]]></name>
<centroid>
<latitude>12.9558</latitude>
<longitude>77.621</longitude>
</centroid>
</place>
</match>
<match>
<place xmlns="http://wherein.yahooapis.com/v1/schema">
<woeId>2295386</woeId>
<type>Town</type>
<name><![CDATA[Kolkata, West Bengal, IN]]></name>
<centroid>
<latitude>22.5499</latitude>
<longitude>88.3716</longitude>
</centroid>
</place>
</match>
<match>
<place xmlns="http://wherein.yahooapis.com/v1/schema">
<woeId>2295411</woeId>
<type>Town</type>
<name><![CDATA[Mumbai, Maharashtra, IN]]></name>
<centroid>
<latitude>19.0762</latitude>
<longitude>72.8759</longitude>
</centroid>
</place>
</match>
</matches>

geo.placemaker

SELECT * FROM geo.placemaker WHERE documentURL = 
"www.telegraphindia.com/1120323/jsp/calcutta/index.jsp"
AND documentType="text/html"
<matches>
<match>
<place xmlns="http://wherein.yahooapis.com/v1/schema">
<woeId>29274615</woeId>
<type>POI</type>
<name><![CDATA[Hatibagan Market, Kolkata, West Bengal, IN]]></name>
<centroid>
<latitude>22.5944</latitude>
<longitude>88.3705</longitude>
</centroid>
</place>
</match>
<match>
<place xmlns="http://wherein.yahooapis.com/v1/schema">
<woeId>2295386</woeId>
<type>Town</type>
<name><![CDATA[Kolkata, West Bengal, IN]]></name>
<centroid>
<latitude>22.5499</latitude>
<longitude>88.3716</longitude>
</centroid>
</place>
</match>
<match>
<place xmlns="http://wherein.yahooapis.com/v1/schema">
<woeId>29281863</woeId>
<type>Drainage</type>
<name><![CDATA[Salt Lake, Bidhan Nagar, West Bengal, IN]]></name>
<centroid>
<latitude>22.5875</latitude>
<longitude>88.4192</longitude>
</centroid>
</place>
</match>
<match>
<place xmlns="http://wherein.yahooapis.com/v1/schema">
<woeId>56518419</woeId>
<type>POI</type>
<name><![CDATA[Metro, Kolkata, West Bengal, IN]]></name>
<centroid>
<latitude>22.4957</latitude>
<longitude>88.3988</longitude>
</centroid>
</place>
</match>
<match>
<place xmlns="http://wherein.yahooapis.com/v1/schema">
<woeId>23424848</woeId>
<type>Country</type>
<name><![CDATA[India]]></name>
<centroid>
<latitude>21.7866</latitude>
<longitude>82.7948</longitude>
</centroid>
</place>
</match>
<match>
<place xmlns="http://wherein.yahooapis.com/v1/schema">
<woeId>29271178</woeId>
<type>POI</type>
<name><![CDATA[Calcutta University, Kolkata, West Bengal, IN]]></name>
<centroid>
<latitude>22.5749</latitude>
<longitude>88.3631</longitude>
</centroid>
</place>
</match>
</matches> 

Putting It Together



Demo: http://icant.co.uk/geomaker/index.php
Code: https://github.com/codepo8/GeoMaker


Interesting hacks

http://trendsmap.com/local/india

  Awesome Apps


Awesome Apps

AUGMENTED REALITY

Useful Resources

http://developer.yahoo.com/geo/
http://isithackday.com/hacks/geo/
http://isithackday.com/geoplanet-explorer/
http://developer.yahoo.com/geo/geoplanet/data/

Questions?