HTML and CSS Reference
In-Depth Information
object that receives latitude and longitude information. Here's the code in the latLongApp.display
method that displays the raw information to the user:
latLongApp.display = function (location) {
document.getElementById("lat").innerHTML = location.coordinate.latitude;
document.getElementById("long").innerHTML = location.coordinate.longitude;
Figure 12-15 shows the final result.
FIGURE 12-15 Raw latitude and longitude numbers shown to the user.
Note that the user may revoke permission to use the location manager at any time by going to
the Settings page and acting on the Permission page (see Figure 12-16). Typically, the first time the
application is launched on the computer, the system asks the user explicitly to enable the capability;
subsequently, it's up to the user to revoke or grant permission for a capability. That same logic applies
to the earlier webcam example too.
Search WWH ::

Custom Search