HTML and CSS Reference
In-Depth Information
After the user accepts, the browser looks up the location. When it finds
the location, the function is called and the coordinates are displayed.
Finding your location more accurately
Notice that the two screenshots at the end of the previous section are
reporting different coordinates—they're about two miles apart. At the
time when these were taken, my phone and my laptop were lying side
by side on the same table—considerably closer than two miles! This
discrepancy is because the browser on my laptop and the browser on
my phone use different location service providers. There are four com-
mon ways of identifying location.
Geolocation options
satellite
Cell tower
wi
-
fi
address database
Very accurate (1-20m)
in open space
Can be slow to
acquire satellite
lock
Accuracy (20-200m)
depends on cell
tower spacing
Needs mobile signal
Very accurate (10-15m)
in urban areas
Needs network
connection for
lookup
Not accurate (1000-40000m)
Works on desktops
Needs network
connection