![]()
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 :)
Y.geolocation arguments
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');
});
});| 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-2011 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