WordCamp Columbus - Location Based Integrations

  • 3,985 views
Uploaded on

 

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
3,985
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
17
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. WordCampCB
    Location Based Services
  • 2. Hash Tags and Whatnot
    #wccb – WordCamp Columbus
    #wccb #lbs – LBS Session
  • 3. Introductions
    50% of the United States population lives
    within a 500 mile radius of Columbus.
  • 4. Who are You and Why are You here?
    Understanding
    Ideas or Insights
    Technologies
  • 5. Introductions
    @LukePilon
    Software Architect
    WordPress
    4 Years as a User
    2 Years Designing Software
    Community Involvement
    CEO at Mobiah
    AC/DC, Lolcats, and the 80s Movies
    Mobiah, Inc
    Services, Software, Data
    Acquisition and Loyalty
    GPL Software
    Producers of GeoPosty
    3 Plugins in the .ORG Repository
  • 6. Content for Today
    Orientation – What is a LBS
    Logic – When to leverage LBS
    Methods – Access User Location
    Basic Delivery – How to Deliver a Simple LBS Loop
  • 7. What the what
    Location-Based Services refers to a broad range of services that are based on (or enhanced by) information about the physical location of a user and/or device.
    $10 billion in revenue by 2016*
    http://www.businesswire.com/news/home/20110609006492/en/Strategy-Analytics-Cellphone-Privacy-Concerns-Short-Term-Barrier
  • 8. What is a LBS?
    They are a LBS and you are a LBS
    Everyone’s a LBS, S, S, S….
  • 9. Location Based Services
    The time and place to use them.
  • 10. Location is Important
    What level of location do you actually need before your user starts to see value?
    Continent
    Nation
    State
    City
    Block
  • 11. Use Cases
    Ad Targeting
    Digital Rights Management
    Localizing Content
    Fraud Prevention
  • 12. Use Cases and You
    Providing Specific Deals, Moving Inventory
    Protecting Your Content Rights / Restrictions
    Enriching the User’s Experience
    Blocking Unauthorized Users
  • 13. Food For Thought on LBS
    20% of all Google Searches Performed on a Desktop Involve Location
    40% of all Google Searches Performed on a Mobile Devices Involve Location
  • 14. Accessing User Location
  • 15. Implementations
    IP Geolocation
    HTML5
  • 16. IP Geolocation
    You have an IP Address & we know geographically where that is.
  • 17. IP GEO Properties
    Always On
    Static in Nature
    No Permission
    25-50 Mile Localization
  • 18. IP GEO LIBRARIESHow it gets done
    Agreements with ISPs
    AppSourcing the Crowd
    Mad Scientists with Mad Bots
    Wifi Libraries
  • 19. IP Geo Libraries
    Service Providers
    IP2Location
    MaxMind
    Quova, a Neustar Service
    Libraries in General
    4B IP Addresses
    ~ 20% Actively Changing
    Accessible via DB, API
  • 20. Plugins that do IP Geo
    GeoPosty 4,084 Downloads – 4.25 Stars
    Quova IP Technology
    IP2Location Tags – 468 Downloads – 5 Stars
    IP2Location IP Technology
    WP Geolocation– 1,120 Downloads – 2.75 Stars
    MaxMind IP Technology
  • 21. Plugin Features
    Shortcodes
    Preconfigured Widgets
    Redirection
    3rd Party LBS Integrations
  • 22. Obligatory CODE SLIDE
    <?php echo do_shortcode('[geocity]');  ?>
    [geolongitude] and [geolatitude]
  • 23. HTML5 Geolocation
    Permission based access to users’ location.
  • 24. HTML5 Background
    A collection of HTML standards being brought into adoption.
    Not something that’s going to show up all at once, not even on your birthday. #sorry
    Many features are already in adoption with current browsers.
  • 25. HMTL5 Geolocation
    A singular feature of the HTML5 Standard
    Off By Default
    Can be coded as dynamic
    Permission Based, Error handling can be difficult
    ~ 12 Meter Localization
  • 26. HTML5 Geolocation APIHow it Gets Done
    Cell Tower Triangulation
    Device GPS
    IP Geo Libraries
  • 27. HTML5 Geolocation API
    IE – 9.0+
    Firefox – 3.5+
    Safari – 5.0+
    Chrome – 5.0+
    Opera – 10.6
    iPhone – 3.0+
    Android – 2.0+
    http://diveintohtml5.org/geolocation.html
  • 28. Browser Adoption
  • 29. IE Support #Fail
  • 30. Firefox Support
  • 31. A Safe AssumptionBefore the Opt-In
    1+ out of 2 Users
    Can Currently Support HTML5 Geolocation
  • 32. Google Analytics Will Set You Free
  • 33. Plugins
  • 34. Obligatory CODE SLIDE
    function get_location() { navigator.geolocation.getCurrentPosition(show_map); }
    // Callback function once location has been granted
    function show_map(position) { var latitude = position.coords.latitude; var longitude = position.coords.longitude; // let's show a map or do something interesting! }
  • 35. Stand and Deliver
    You, or your client, as an LBS
  • 36. Best Practices
    Location, Location, Location with Balance, Balance, Balance
    Give the User A Logical Exit
    Don’t Be Evil, Get Consent, Allow Record Removal
    Privacy Policy FTW
  • 37. Never, Never Never Ever
    Hello [geocity]! Welcome to my site!
    #FAIL #FAIL #FAIL #FAIL
  • 38. Super Simple LBSing.
    Step 1: Put Your Content to City Categories
    Step 2: Load The User’s Location Into Shortcodes
    Step 3: Get Loopy
  • 39. The Basic Geo Loop
    <?php$city = do_shortcode('[geocity]');$args = array('category_name' => $city);$myCityQuery = new WP_Query($args);if ($myCityQuery->have_posts()): while ($myCityQuery->have_posts()): $myCityQuery->the_post();//post stuffendwhile; endif;
    ?>
  • 40. Bonus Material
  • 41. CODE – Useful Functions
    // http://snipplr.com/view/2531/calculate-the-distance-between-two-coordinates-latitude-longitude/
    function getGeoDistance($lat1, $lng1, $lat2, $lng2, $miles = true)
    {
    $pi80 = M_PI / 180;
    $lat1 *= $pi80;
    $lng1 *= $pi80;
    $lat2 *= $pi80;
    $lng2 *= $pi80;
    $r = 6372.797; // mean radius of Earth in km
    $dlat = $lat2 - $lat1;
    $dlng = $lng2 - $lng1;
    $a = sin($dlat / 2) * sin($dlat / 2) + cos($lat1) * cos($lat2) * sin($dlng / 2) * sin($dlng / 2);
    $c = 2 * atan2(sqrt($a), sqrt(1 - $a));
    $km = $r * $c;
    return ($miles ? ($km * 0.621371192) : $km);
    }
  • 42. CODE – Useful Functions
    // http://www.hashbangcode.com/blog/search-engine-spider-detection-php-258.html
    function geoSpiderDetect() {
    $agentArray = array("ArchitextSpider", "Googlebot", "TeomaAgent",
    "Zyborg", "Gulliver", "Architext spider", "FAST-WebCrawler",
    "Slurp", "Ask Jeeves", "ia_archiver", "Scooter", "Mercator",
    "crawler@fast", "Crawler", "InfoSeek Sidewinder",
    "almaden.ibm.com", "appie 1.1", "augurfind", "baiduspider",
    "bannana_bot", "bdcindexer", "docomo", "frooglebot", "geobot",
    "henrythemiragorobot", "sidewinder", "lachesis", "moget/1.0",
    "nationaldirectory-webspider", "naverrobot", "ncsa beta",
    "netresearchserver", "ng/1.0", "osis-project", "polybot",
    "pompos", "seventwentyfour", "steeler/1.3", "szukacz",
    "teoma", "turnitinbot", "vagabondo", "zao/0", "zyborg/1.0",
    "Lycos_Spider_(T-Rex)", "Lycos_Spider_Beta2(T-Rex)",
    "Fluffy the Spider", "Ultraseek", "MantraAgent","Moget",
    "T-H-U-N-D-E-R-S-T-O-N-E", "MuscatFerret", "VoilaBot",
    "Sleek Spider", "KIT_Fireball", "WISEnut", "WebCrawler",
    "asterias2.0", "suchtop-bot", "YahooSeeker", "ai_archiver",
    "Jetbot"
    );
  • 43. Parting Remarks
    Imagine 2015
  • 44. Parting Remarks
    Go do something excellent.
  • 45. Questions?
    Luke Pilon
    luke@mobiah.com
    @lukepilon