Building the Application and Making It Your Own
The map spotlight application sets up the combination of Google Maps functionality with HTML5 coding. A quick summary of the application is the following:
init
: Initialization, including bringing in the map (makemap
) and setting up mouse events with handlers:showshadow
,pushcanvasunder
,clearshadow
makemap
: Brings in a map and sets up event handling, including the call tocheckit
- showshadow: Invokes
drawshadowmask
- pushcanvasunder: Enables events the on map
checkit
: Calculates distance, adds a custom marker, and displays distance and rounded latitude and longitude
The function table describing the invoked/called by and calling relationships (Table 4-1) is the same for all the applications.
Get HTML5 and JavaScript Projects now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.