Include to favorites
Log in Logout Register
Start Login Contact Help Photos What's new
Avanced Search
FAQ
RESULTS IN: TEXT IMAGES
 

Hello, Guest
Login  Register
Online: 104 visitors

Blogging (2)
Business (1)
Educational (2)
Gadgets (1)
Games (8)
High Tech News (1)
Internet (1)
PC (2)
PDA (0)
Science (1)
Shopping (6)
Software (1)
Wireless (1)


Browse by date

<< May 2012 >>
MonTueWedThrFriSatSun
123456
78910111213
14151617181920
21222324252627
28293031




Recent searches

Popular searches

Hot this month

Weblogs Archive


GADGETS AND GAMES DIRECTORY :: > Software Register Weblog >  Software Tech Weblogs - WEEKLYBITS.COM GADGETS AND GAMES DIRECTORY
Yahoo User Interface Blog
generated by http://wordpress.org/?v=3.0.4  en Blogger
SEND A FRIEND
Suscribing to  please login first
User: Login

Is a collection of industrial-grade JavaScript utilities and widgets that enable you to efficiently get the most out of today’s powerful web applications.
News and Articles about Designing and Developing with Yahoo! Libraries.Visit Yahoo! User Interface Blog
Address URLhttp://www.yuiblog.com/blog    Registered: 26-Apr-2008
Ads:

Send to email
Visit In the YUI 3 Gallery: Geo In the YUI 3 Gallery: Geo in DevelopmentYUI 3 Gallery
By Nicholas C. Zakas
el 06-May-2011

Geolocation is one of the more exciting HTML5-related technologies to appear in browsers, and the Geo Gallery module gives you access to location information. The W3C Geolocation API provides a simple interface to access the user’s location from JavaScript. The following code accesses the user’s current location in a supporting browser:

navigator.geolocation.getCurrentPosition(function(result) {
    //success handler
}, function (result){
    //failure handler
})

When this code is executed, the browser pops up a message asking for the user’s permission to reveal their current location. The dialog displayed in Firefox looks like this:

Geolocation dialog in Firefox

If the user denies permission, or an error occurs while trying to get the current position, the failure handler is called. Otherwise, the success handler is called with information about the current location. That information comes in the form of latitude and longitude coordinates (other information may be available as well, depending on the implementation).

The W3C Geolocation API is supported in Internet Explorer 9+, Firefox 3.5+, Safari 5+, Chrome, and Opera 10.6 as well as on Mobile Safari and Webkit on Android, making it fairly ubiquitous.

The Geo module uses the Geolocation API when it’s available, and falls back to an IP-based lookup via the YQL pidgets.geoip open table when not available or if there is an error. This table is exceptionally useful because you can lookup location information for a specific IP address, or you can omit the IP address and it will return the location information for the IP address making the request. The latter part ensures that you need to make only one request to get location information instead of two (other solutions use one to get the IP address and then one to get the location information for that IP address).

In typical YUI fashion, the Geo module provides a streamlined interface for accessing geolocation information. Instead of providing two callback functions, one for success and one for failure, just pass in one. The result object has a success property indicating if the call succeeded:

YUI({
    gallery: 'gallery-2011.04.27-17-14'
}).use('gallery-geo', function(Y) {

    Y.Geo.getCurrentLocation(function(response){

        //check to see if it was successful
        if (response.success){
            console.log(response.coords.latitude);
            console.log(response.coords.longitude);
        }

    });

});

When a geolocation call completes successfully, the success property is true and response.coords is filled with at least two properties: latitude and longitude (if the native API is used, then all available properties are copied to this object). There is also a source property on the response object that is either “native”, if the information was retrieved from the native API, or “pidgets.geoip”, if it was retrieved by YQL. If an error occurs, or if the user declines to provide location information, then success is false.

If the Geolocation API has an error, the Geo module will try IP-based lookup instead. If, however, the user declines to provide information, the IP-based lookup is not performed.

Keep in mind that the native API is much more accurate than IP location, so you won’t get the same quality results in browsers without native geolocation support. However, the Geo module is a good first step to providing location-based experiences to your users.



Read 21 times

Suscribing to  please login first
In the YUI 3 Gallery: Geo -  Tech Weblogs - WEEKLYBITS.COM  Blogger Is a collection of i

Photologs

Yahoo User Interface Blog Blogger

Is a collection of industrial-grade JavaScript utilities and widgets that enable you to efficiently get the most out of today’s powerful web applications. Yahoo! User Interface Blog News and Articles about Designing and Developing wiht Yahoo! Libraries.

In the YUI 3 Gallery: Geo
Geolocation dialog in Firefox - In the YUI 3 Gallery: Geo Geolocation is one of the more exciting HTML5-related technologies to appear in browsers, and the Geo Gallery module gives you access to location information. The W3C Geolocation API provides a simple interface to access the user’s location from JavaScript. The following code accesses the user’s current location in a supporting browser: navigator.geolocation.getCurrentPosition(function [..] Read complete article
Subscribe to In the YUI 3 Gallery: Geo
Published 06-May-2011 by Nicholas C. Zakas in DevelopmentYUI 3 Gallery
Read 21 times. More hits in More articles In the YUI 3 Gallery: Geo Images about In the YUI 3 Gallery: Geo
Nerdblog Blogger

Provides news about hardware, software, notebooks, laptops, PCs, Mac, PDAs
Nerdblog.Net

Gallery: Daguerre to Be Different!
: Image: George H. Johnson, 1853/Courtesy Oakland Museum of California The daguerrotype process had a relatively short commercial life span of about two decades. A major reason was that innovators capitalized on “France’s gift to the world” and started improving the process immediately. Better emulsions and better developing and fixing solutions improved image quality and reduced [..] Read complete article
Subscribe to In the YUI 3 Gallery: Geo
Published 18-Aug-2008 by Nerdblog in General
Read 14 times. More hits in More articles Gallery: Daguerre to Be Different! Images about Gallery: Daguerre to Be Different!
Yahoo User Interface Blog Blogger

Is a collection of industrial-grade JavaScript utilities and widgets that enable you to efficiently get the most out of today’s powerful web applications. Yahoo! User Interface Blog News and Articles about Designing and Developing wiht Yahoo! Libraries.

Introducing the YUI 3 Gallery
Enough already...where Last week at YUICONF 2009, we introduced the YUI 3 Gallery, a new way to contribute to YUI 3. Within a few hours, Greg Hinch had posted the first community contribution to the Gallery. Today, less than a week later, there are 18 modules in the gallery — all of them available for [...] [..] Read complete article
Subscribe to In the YUI 3 Gallery: Geo
Published 04-Nov-2009 by Eric Miraglia and Dav Glass in DevelopmentcontributingyuiYUI 3yui 3 gallery
Read 29 times. More hits in More articles Introducing the YUI 3 Gallery Images about Introducing the YUI 3 Gallery
Joystiq Blogger

Covers video game news from an independent, unbiased perspective
Joystiq Joystiq

Gallery: Say hello to the Nintendo 3DS
Image 0 en  - Gallery: Say hello to the Nintendo 3DS A beautiful aqua blue Nintendo 3DS arrived from Japan while we were away GDC-ing the sights. For those of you who haven't obsessively inspected every angle of the upcoming device yet, we set to work taking Glamour Shots of the handheld and its included accessories. [..] Read complete article
Subscribe to In the YUI 3 Gallery: Geo
Published 07-Mar-2011 by JC Fletcher in 3dsdsnintendonintendo-3ds
Read 13 times. More hits in More articles Gallery: Say hello to the Nintendo 3DS Images about Gallery: Say hello to the Nintendo 3DS
Yahoo User Interface Blog Blogger

Is a collection of industrial-grade JavaScript utilities and widgets that enable you to efficiently get the most out of today’s powerful web applications. Yahoo! User Interface Blog News and Articles about Designing and Developing wiht Yahoo! Libraries.

In the YUI 3 Gallery: The Carousel Module
About the authors: Gopal Venkatesan (@g13n) works for Yahoo! in Bangalore where is one of the deans of the frontend engineering community; Gopal has been the lead engineer on the YUI 2 Carousel project since the 2.6.0 release. He is also the author of the new YUI 3 Gallery Carousel module. Fabian Frank [...] [..] Read complete article
Subscribe to In the YUI 3 Gallery: Geo
Published 13-Dec-2010 by Gopal Venkatesan and Fabian Fr in DevelopmentYUI 3 GallerycarouselYUI 3
Read 33 times. More hits in More articles In the YUI 3 Gallery: The Carousel Module Images about In the YUI 3 Gallery: The Carousel Module
Yahoo User Interface Blog Blogger

Is a collection of industrial-grade JavaScript utilities and widgets that enable you to efficiently get the most out of today’s powerful web applications. Yahoo! User Interface Blog News and Articles about Designing and Developing wiht Yahoo! Libraries.

In the YUI 3 Gallery: Server-Sent Events
Push notifications on the web are increasing in popularity, as evidenced by the excitement over Web Sockets, and with good reason. The web is moving towards more accurate and up-to-date information as audiences turn to the Internet for real-time updates of stocks, news, sports, and more. While Web Sockets represents a giant leap forward in [...] [..] Read complete article
Subscribe to In the YUI 3 Gallery: Geo
Published 29-Nov-2010 by Nicholas C. Zakas in DevelopmentYUI 3 Gallery
Read 18 times. More hits in More articles In the YUI 3 Gallery: Server-Sent Events Images about In the YUI 3 Gallery: Server-Sent Events
Yahoo User Interface Blog Blogger

Is a collection of industrial-grade JavaScript utilities and widgets that enable you to efficiently get the most out of today’s powerful web applications. Yahoo! User Interface Blog News and Articles about Designing and Developing wiht Yahoo! Libraries.

In the YUI 3 Gallery: Base64 and Y64 encoding
Nicholas C. Zakas (@slicknet on Twitter) is the lead frontend engineer on the Yahoo! homepage, a YUI contributor, and author of Professional JavaScript for Web Developers and the newly-released, High Performance JavaScript. Base64 encoding was originally designed to allow lossless data passing between 8-bit and 7-bit systems. The primary example of its usage is in [...] [..] Read complete article
Subscribe to In the YUI 3 Gallery: Geo
Published 06-Jul-2010 by Nicholas C. Zakas in Development
Read 37 times. More hits in More articles In the YUI 3 Gallery: Base64 and Y64 encoding Images about In the YUI 3 Gallery: Base64 and Y64 encoding
Yahoo User Interface Blog Blogger

Is a collection of industrial-grade JavaScript utilities and widgets that enable you to efficiently get the most out of today’s powerful web applications. Yahoo! User Interface Blog News and Articles about Designing and Developing wiht Yahoo! Libraries.

In the YUI 3 Gallery: The Preload Module
A few weeks ago, Stoyan Stefanov (@stoyanstefanov) published the result of his research about preloading components in advance without executing them. This technique can help improve the performance of successive pages that make use of the cached resources. To leverage these results, we decided to port it to YUI 3 with a new module called "gallery-preload", [...] [..] Read complete article
Subscribe to In the YUI 3 Gallery: Geo
Published 10-Jun-2010 by Caridy Patino in DevelopmentYUI 3 Gallery
Read 24 times. More hits in More articles In the YUI 3 Gallery: The Preload Module Images about In the YUI 3 Gallery: The Preload Module
Yahoo User Interface Blog Blogger

Is a collection of industrial-grade JavaScript utilities and widgets that enable you to efficiently get the most out of today’s powerful web applications. Yahoo! User Interface Blog News and Articles about Designing and Developing wiht Yahoo! Libraries.

In the YUI 3 Gallery: Extensions for SVG, Created for SVG Wow!
Introduction SVG (Scalable Vector Graphics) provides a declarative syntax for interactive, animated 2D graphics: shapes, images and text. SVG support is part of the [...] [..] Read complete article
Subscribe to In the YUI 3 Gallery: Geo
Published 18-Oct-2010 by Vincent Hardy in DevelopmentYUI 3 Gallery
Read 27 times. More hits in More articles In the YUI 3 Gallery: Extensions for SVG, Created for SVG Wow! Images about In the YUI 3 Gallery: Extensions for SVG, Created for SVG Wow!
Yahoo User Interface Blog Blogger

Is a collection of industrial-grade JavaScript utilities and widgets that enable you to efficiently get the most out of today’s powerful web applications. Yahoo! User Interface Blog News and Articles about Designing and Developing wiht Yahoo! Libraries.

YUI 3 Gallery: Accordion Widget
YUI3 Accordion Widget - YUI 3 Gallery: Accordion Widget Accordion is a visual widget that allows the expansion/collapse of grouped items containing arbitrary data. Accordion items can be added or removed dynamically, reordered via drag-and-drop, closed and set as always visible. Originally, I built the widget top of YUI 2, but I’ve since ported it to YUI 3. Accordion is part of the new YUI [...] [..] Read complete article
Subscribe to In the YUI 3 Gallery: Geo
Published 04-Nov-2009 by Iliyan Peychev in DevelopmentIn the WildaccordioniliyanYUI 3yui 3 gallery
Read 64 times. More hits in More articles YUI 3 Gallery: Accordion Widget Images about YUI 3 Gallery: Accordion Widget
Joystiq Blogger

Covers video game news from an independent, unbiased perspective
Joystiq Joystiq

See the new ?99 PSP for free in our gallery
Image 0 en  - See the new ?99 PSP for free in our gallery Now you can get a good look at the new "E1000" model of PSP headed to Europe, one of the most curious announcements from Gamescom. We've got a gallery of official photos, allowing you to examine the budget-priced hardware in detail. We like that the pr [..] Read complete article
Subscribe to In the YUI 3 Gallery: Geo
Published 17-Aug-2011 by JC Fletcher in e1000europegamescom-2011playstationpspsony
Read 13 times. More hits in More articles See the new ?99 PSP for free in our gallery Images about See the new ?99 PSP for free in our gallery
Kotaku`s The Gamers Guide Blogger

XBOX 360 Gamers Weblog Gossip, news and leaks for obsessive gamers Kotaku As if you don't waste enough of your time in a gamer's haze, here's Kotaku: a gamer's guide that goes beyond the press release. Gossip, cheats, criticism, design, nostalgia, pred

PSP Go: The Gallery [E3 2009]
It's svelte, it's sexy, it's sitting there in Totilo's ugly hands: Meet the PSP Go. [..] Read complete article
Subscribe to In the YUI 3 Gallery: Geo
Published 02-Jun-2009 by Brian Crecente in E3 2009 E3E309OriginalPSPpsp goSceaSony
Read 15 times. More hits in More articles  PSP Go: The Gallery [E3 2009] Images about  PSP Go: The Gallery [E3 2009]

Warning We are not responsible of information posted from external feeds. Use this website at your own risk. Notice: We will not be liable for any direct or indirect loss or damage arising under this disclaimer or in connection with our website, whether arising in tort, contract, or otherwise.


Your Site here Your Site here Your site here Your site here Your site here