I'm pleased to announce that Google's Location Service (the same service which powers the My Location feature in many Google products), is now the default location provider in Mozilla Firefox 3.5 beta 4. This means that developers can, with users' permission, gain access to their approximate location without requiring any additional plug-ins or setting configurations. It just works!
Mozilla Firefox 3.5 beta 4 uses the W3C geolocation API, a standard being adopted by many major browsers, so you won't have to branch code in the future.
For web developers, using geolocation services in Firefox is easy! Here's a simple example to get you started:
<html>
<head>
<script type="text/javascript">
function displayLocation(loc) {
var locDiv = document.getElementById("locationDiv");
locDiv.innerHTML = "lat: " + loc.coords.latitude + ", lon:" + loc.coords.longitude;
}
function getLocation() {
navigator.geolocation.getCurrentPosition(displayLocation);
}
</script>
</head>
<body>
<a href="#" onClick="getLocation()">Click here to display location</a><br>
<div id="locationDiv"></div>
</body>
</html>
When your site calls getCurrentPosition, a drop down will ask the user permission to get his or her location. Upon acceptance of the request, the callback function you specify will run with the machine's approximate location contained in the loc parameter. Here's a screenshot of the permission dropdown:We hope you find the new and useful ways to use the new geolocation capabilities of Firefox!
US Patent No. 2,525,425, entitled “system and method for defining an event based on relationship between an object location and a user-defined zone” recently issued with broad claims covering location cased application where users are allowed access to each other location information relative to user defined zones, see claims 1 and 27 of the patent. It seems to cover Google Latitude.
ReplyDeleteUS Patent No. 7,525,425, entitled “system and method for defining an event based on relationship between an object location and a user-defined zone” issued a few days ago with broad claims covering location cased application where users are allowed access to each other location information relative to user defined zones, see claims 1 and 27 of the patent. It seems to cover Google Latitude.
ReplyDeletehow can web master get benefit in terms of getting location of website viewers?
ReplyDeleteIs it usefull for ecommerce website?
reply me