Return to Snippet

Revision: 43845
at April 1, 2011 01:51 by vagrantradio


Initial Code
function positionError(err) {
    var msg;
    switch(err.code) {
      case err.UNKNOWN_ERROR:
        msg = "Unable to find your location";
        break;
      case err.PERMISSION_DENINED:
        msg = "Permission denied in finding your location";
        break;
      case err.POSITION_UNAVAILABLE:
        msg = "Your location is currently unknown";
        break;
      case err.BREAK:
        msg = "Attempt to find location took too long";
        break;
      default:
        msg = "Location detection not supported in browser";
    }
    document.getElementById('info').innerHTML = msg;
  }

Initial URL

                                

Initial Description

                                

Initial Title
GPS Location Error Function

Initial Tags
mobile

Initial Language
JavaScript