Pinpoint users' locations via JavaScript and the Web's Geolocation API

By John Duckett, Computerworld |  Software, Geolocation, insider

You've probably visited websites where you've been asked to share your location; if you agree, the site determines where you are and then typically gives you extra functionality such as directions or local weather.

Sites can pinpoint your location (if you give permission) by implementing the Geolocation API, a standard adopted by the World Wide Web Consortium that's available on recent versions of platforms including IE, Firefox, Safari, Chrome, Opera, iOS and Android.

In this PDF download, you'll see how just a few lines of JavaScript are needed to discover a user's location. (This PDF is excerpted with permission from the publisher, Wiley, from JavaScript & jQuery: Interactive front-end Web development by John Duckett. Copyright 2014 all rights reserved.

To continue reading, register here to become an Insider. You'll get free access to premium content from CIO, Computerworld, CSO, InfoWorld, and Network World. Go now!


Originally published on Computerworld |  Click here to read the original story.
Join us:
Facebook

Twitter

Pinterest

Tumblr

LinkedIn

Google+

Spotlight on ...
Online Training

    Upgrade your skills and earn higher pay

    Readers to share their best tips for maximizing training dollars and getting the most out self-directed learning. Here’s what they said.

     

    Learn more

SoftwareWhite Papers & Webcasts

Webcast On Demand

Next Generation Firewall

Sponsor: PC Connection

See more White Papers | Webcasts

Answers - Powered by ITworld

ITworld Answers helps you solve problems and share expertise. Ask a question or take a crack at answering the new questions below.

Ask a Question
randomness