• Register
  • Log In
  • Home
  • Quick Start
    • Configurator
    • Download YUI 3
  • Documentation
    • User Guides
    • Examples
    • API Docs
    • Environments
    • Tutorials
  • Community
    • Gallery
    • Blog
    • Forums
    • YUI Theater
    • Calendar
  • Contribute
    • YUI on GitHub »
    • File a Ticket
    • View Tickets
    • Dashboard
  • Other Projects
    • Shifter »
    • Yogi »
    • YUI 2
    • YUI Doc »
    • YUI Test
    • YUI Website
    • YUI Compressor »
    • YUI Builder »
    • YUI PHP Loader
    • Grid Builder »
    • Skin Builder »
  • YUI
  • >
  • Community
  • >
  • Gallery

Gallery

Modules

  • Home
  • Featured
  • Popular
  • New
  • All

Documentation

  • Yogi Documentation
  • Shifter Documentation
  • Developer Guide
  • Module Setup

Tag Cloud

Context Navigation

    YUI Library is not responsible for bugs or support with this module. It is available as a free service. For support please contact the module owner with the provided links.

    Geolocation (gallery-geolocation)

    Last Updated: 04/6/10
    + 0 -

    Mikael Abrahamsson

    See 1 more by this user.

    Created: 03/26/10
    Project: YUI 3
    License: YUI BSD
    YUI Version: 3.1.0
    Free for use.

    A simple function to get the latitude and longitude from the HTML5 geolocation API with fallbacks the Google Gears Geolocation API and IP based geo positioning. Inspired by http://github.com/codepo8/YQL-Geo-Library and others.

    PS. This is my first module so be gentle :)

    • Tags:
    • geolocation
    • latitude
    • longitude
    • m64253
    • Download
    • Docs
    • Homepage
    • Bugs
    • Source
    • Example
    • Forum
    • History

    Y.geolocation arguments

    1. fSuccess Function Success callback function called when all is done and ok.
    2. fFailure Function Failure callback function called when something has gone wrong.
    3. oContext Object OPTIONAL Set the scope of the callback functions to this object.

    Code Sample

    YUI({
    	modules: {
    		'gallery-geolocation': {
    			fullpath: 'http://github.com/m64253/yui3-gallery/raw/master/build/gallery-geolocation/gallery-geolocation-min.js',
    			requires: ['gallery-jsonp', 'gallery-yql'],
    			optional: [],
    			supersedes: []
    		}
    	}
    }).use('gallery-geolocation', function(Y) {
    	Y.geolocation(function(oCoords){
    		alert('latitude: ' + oCoords.latitude + '\nlongitude: ' + oCoords.latitude + '\nprovider: ' + oCoords.provider);
    	}, function() {
    		alert('buh huh, no location');
    	});
    });

    Forum Posts

    Subject Author Date
    There's a gallery-jsonp Module Eric Ferraiuolo 03/31/10
    Re: There's a gallery-jsonp Module Mikael Abrahamsson 04/6/10
    Needs a timeout of some kind Matt Snider 09/22/10

    © 2006-2013 Yahoo! Inc. All rights reserved.
    All code on this site is licensed under the BSD License unless stated otherwise.
    About This Site · Security Contact Info