Geolocation for Web - Geohash, GeoIP & HTML5 Geolocation
Post on 10-May-2015
520 Views
Preview:
Transcript
Geolocation for WebManuel Berger - Dez 2013, Technologieplauscherl
48.32926, 14.32076
48.32926, 14.32076
u2d4vyh43gh
u2d4vyh43ghCompuware
u2d4vyhDornach
u2d4vyUrfahr
u2d4vLinz
u2d4OÖ
Geohash
! www.bigdatamodeling.org/2013/01/intuitive-geohash.html
Database• Query on Single Index
• Grouping Of Points
• Zooming And Aggregation
• Caching At Scale
• Finding Nearest Points
! http://www.bigfastblog.com/geohash-intro
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
Problem!?
Problem!?
0 1
Problem!?
0 1
Solution!
8 surrounding geohashes
Used in MongoDB and HBase to implement proximity searches
Getting Dirty
Multiple Implementations --> See Wikipedia
Java: github.com/davidmoten/geo !
geohash.org
GeoIP 127.0.0.1 = @Home
Getting Dirty
Multiple GeoIP-DB providers
Free: Maxmind (bit.ly/1kf6fdv)
Yep, there is a Grails Plugin ;) (grails.org/plugin/geoip)
HTML5 Geolocation JS-Part
Formerly: W3C Geolocation
if (navigator.geolocation) { navigator.geolocation.getCurrentPosition( successHandler, [errorHandler]); }
if (navigator.geolocation) { navigator.geolocation.getCurrentPosition( successHandler, [errorHandler]); }
Geolocation API Support
IE Firefox Safari Chrome Opera iPhone Android
9.0+ 3.5+ 5.0+ 5.0+ 10.6+ 3.0+ 2.0+
GeoIP
Geohash
Geolocation
Distance sort
Geocoding
top related