HTML and CSS Reference
In-Depth Information
The set-up and usage code looks like this:
<!DOCTYPE html>
<html lang= "en" >
<head>
<script
src= "http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" >
</script>
<script src= "../js-webshim/minified/extras/modernizr-custom.js" ></script>
<script src= "../js-webshim/minified/polyfiller.js" ></script>
<script>
$ . webshims . setOptions ( 'geolocation' , {
confirmText : '{location} wants to know your position. It is Ok.'
});
//load all polyfill features
//or load only a specific feature with $.webshims.polyfill('feature-name');
$ . webshims . polyfill ();
</script>
A few other scripts try to handle this polyfill, including:
• Geolocation API crossbrowser support ( http://bit.ly/Geolocation-API-Polyfill )
• HTML5 Geolocation with fallback ( http://gist.github.com/366184 )
Currently, one of the greatest drawbacks to using the Geolocation API within a mobile
web browser is not having the ability to run in the background after the browser has
closed. For example, it gets extremely difficult to track the user in the background and
allow the person to switch to another app outside of the mobile browser. At this point,
your browser must remain open as a background process for your Geolocation-based
app to work properly.
Search WWH ::




Custom Search