geolocation for web - geohash, geoip & html5 geolocation
TRANSCRIPT
![Page 1: Geolocation for Web - Geohash, GeoIP & HTML5 Geolocation](https://reader034.vdocument.in/reader034/viewer/2022042503/554f1928b4c9058b388b4b98/html5/thumbnails/1.jpg)
Geolocation for WebManuel Berger - Dez 2013, Technologieplauscherl
![Page 2: Geolocation for Web - Geohash, GeoIP & HTML5 Geolocation](https://reader034.vdocument.in/reader034/viewer/2022042503/554f1928b4c9058b388b4b98/html5/thumbnails/2.jpg)
48.32926, 14.32076
![Page 3: Geolocation for Web - Geohash, GeoIP & HTML5 Geolocation](https://reader034.vdocument.in/reader034/viewer/2022042503/554f1928b4c9058b388b4b98/html5/thumbnails/3.jpg)
48.32926, 14.32076
u2d4vyh43gh
![Page 4: Geolocation for Web - Geohash, GeoIP & HTML5 Geolocation](https://reader034.vdocument.in/reader034/viewer/2022042503/554f1928b4c9058b388b4b98/html5/thumbnails/4.jpg)
u2d4vyh43ghCompuware
u2d4vyhDornach
u2d4vyUrfahr
u2d4vLinz
u2d4OÖ
Geohash
![Page 5: Geolocation for Web - Geohash, GeoIP & HTML5 Geolocation](https://reader034.vdocument.in/reader034/viewer/2022042503/554f1928b4c9058b388b4b98/html5/thumbnails/5.jpg)
! www.bigdatamodeling.org/2013/01/intuitive-geohash.html
![Page 6: Geolocation for Web - Geohash, GeoIP & HTML5 Geolocation](https://reader034.vdocument.in/reader034/viewer/2022042503/554f1928b4c9058b388b4b98/html5/thumbnails/6.jpg)
![Page 7: Geolocation for Web - Geohash, GeoIP & HTML5 Geolocation](https://reader034.vdocument.in/reader034/viewer/2022042503/554f1928b4c9058b388b4b98/html5/thumbnails/7.jpg)
![Page 9: Geolocation for Web - Geohash, GeoIP & HTML5 Geolocation](https://reader034.vdocument.in/reader034/viewer/2022042503/554f1928b4c9058b388b4b98/html5/thumbnails/9.jpg)
Database• Query on Single Index
• Grouping Of Points
• Zooming And Aggregation
• Caching At Scale
• Finding Nearest Points
! http://www.bigfastblog.com/geohash-intro
![Page 10: Geolocation for Web - Geohash, GeoIP & HTML5 Geolocation](https://reader034.vdocument.in/reader034/viewer/2022042503/554f1928b4c9058b388b4b98/html5/thumbnails/10.jpg)
Quick ’n Dirty Proximity Search
22rt841 <-- Far way party
u2d4vyh <-- Somebody else's party nearby
u2d4vyh <-- Our party
u2d4vyh <-- Another nearby party
ub84ew3 <-- Not so close party
![Page 11: Geolocation for Web - Geohash, GeoIP & HTML5 Geolocation](https://reader034.vdocument.in/reader034/viewer/2022042503/554f1928b4c9058b388b4b98/html5/thumbnails/11.jpg)
Problem!?
![Page 12: Geolocation for Web - Geohash, GeoIP & HTML5 Geolocation](https://reader034.vdocument.in/reader034/viewer/2022042503/554f1928b4c9058b388b4b98/html5/thumbnails/12.jpg)
Problem!?
0 1
![Page 13: Geolocation for Web - Geohash, GeoIP & HTML5 Geolocation](https://reader034.vdocument.in/reader034/viewer/2022042503/554f1928b4c9058b388b4b98/html5/thumbnails/13.jpg)
Problem!?
0 1
![Page 14: Geolocation for Web - Geohash, GeoIP & HTML5 Geolocation](https://reader034.vdocument.in/reader034/viewer/2022042503/554f1928b4c9058b388b4b98/html5/thumbnails/14.jpg)
Solution!
8 surrounding geohashes
![Page 15: Geolocation for Web - Geohash, GeoIP & HTML5 Geolocation](https://reader034.vdocument.in/reader034/viewer/2022042503/554f1928b4c9058b388b4b98/html5/thumbnails/15.jpg)
Used in MongoDB and HBase to implement proximity searches
![Page 16: Geolocation for Web - Geohash, GeoIP & HTML5 Geolocation](https://reader034.vdocument.in/reader034/viewer/2022042503/554f1928b4c9058b388b4b98/html5/thumbnails/16.jpg)
Getting Dirty
Multiple Implementations --> See Wikipedia
Java: github.com/davidmoten/geo !
geohash.org
![Page 17: Geolocation for Web - Geohash, GeoIP & HTML5 Geolocation](https://reader034.vdocument.in/reader034/viewer/2022042503/554f1928b4c9058b388b4b98/html5/thumbnails/17.jpg)
GeoIP 127.0.0.1 = @Home
![Page 18: Geolocation for Web - Geohash, GeoIP & HTML5 Geolocation](https://reader034.vdocument.in/reader034/viewer/2022042503/554f1928b4c9058b388b4b98/html5/thumbnails/18.jpg)
Getting Dirty
Multiple GeoIP-DB providers
Free: Maxmind (bit.ly/1kf6fdv)
Yep, there is a Grails Plugin ;) (grails.org/plugin/geoip)
![Page 19: Geolocation for Web - Geohash, GeoIP & HTML5 Geolocation](https://reader034.vdocument.in/reader034/viewer/2022042503/554f1928b4c9058b388b4b98/html5/thumbnails/19.jpg)
HTML5 Geolocation JS-Part
Formerly: W3C Geolocation
![Page 20: Geolocation for Web - Geohash, GeoIP & HTML5 Geolocation](https://reader034.vdocument.in/reader034/viewer/2022042503/554f1928b4c9058b388b4b98/html5/thumbnails/20.jpg)
if (navigator.geolocation) { navigator.geolocation.getCurrentPosition( successHandler, [errorHandler]); }
![Page 21: Geolocation for Web - Geohash, GeoIP & HTML5 Geolocation](https://reader034.vdocument.in/reader034/viewer/2022042503/554f1928b4c9058b388b4b98/html5/thumbnails/21.jpg)
if (navigator.geolocation) { navigator.geolocation.getCurrentPosition( successHandler, [errorHandler]); }
![Page 22: Geolocation for Web - Geohash, GeoIP & HTML5 Geolocation](https://reader034.vdocument.in/reader034/viewer/2022042503/554f1928b4c9058b388b4b98/html5/thumbnails/22.jpg)
Geolocation API Support
IE Firefox Safari Chrome Opera iPhone Android
9.0+ 3.5+ 5.0+ 5.0+ 10.6+ 3.0+ 2.0+
![Page 23: Geolocation for Web - Geohash, GeoIP & HTML5 Geolocation](https://reader034.vdocument.in/reader034/viewer/2022042503/554f1928b4c9058b388b4b98/html5/thumbnails/23.jpg)
GeoIP
Geohash
Geolocation
Distance sort
Geocoding