198 Chapter 7—Geolocation
7.6.1 Operation
The application has a very simple structure (see Figure 7.5): In the text box (top
left) you can enter your diary notes. The new HTML5 placeholder attribute lets
the browser show an invitation to enter a new message. If you have already en-
tered notes, the area on the right displays a map section of Google Maps. Under-
neath is the list of entries, including not just the message text, but also location,
time of entry, and distance to current location. You also have the option of delet-
ing messages or displaying the location enlarged on Google Maps. As you can see
in Figure 7.5, the enlarged representation indicates the location with a marker
typical for Google. The circle around the location marker indicates the accuracy
of the determined location.
Because you tend not to constantly change location while developing an ap-
plication, the Firefox add-on Geolocater, introduced in section 7.3, Technical
Background of Determining Position, comes in handy. You have the option of
saving several locations in the add-on, allowing you to test the application while
at home. Ideally though, the application would be used on a smartphone with
GPS support. Both Android-based cell phones and the iPhone fulfill the neces-
sary requirements.
Figure 7.5 Notes with additional geographic information