HTML and CSS Reference
In-Depth Information
HTML5 Geolocation, EPUB, and Ereader Compatibility
As with HTML5 Canvas, Geolocation support is not yet widespread in EPUB readers.
At the time of writing (September 2011) , among the major ereaders, iBooks is again
the only one that supports the Geolocation API.
However, it's important here to draw a distinction between “supports the Geolocation
API” and “supports querying geolocation web services (like GeoNames).” While
iBooks can query the Geolocation API and will return the user's latitude/longitude
coordinates, it does not support the necessary XMLHttpRequest functionality for querying
Internet web services, throwing an ABORT_ERR: XMLHttpRequest Exception 102 error (see
Figure 2-3 )
So at this time, it's not possible to embed our Geolocated Tale in an EPUB and have it
successfully render in iBooks. However, you can instead post the story on the Web,
and link to it within your EPUB (Mobile Safari on iPhone/iPod/iPad will indeed render
the story successfully).
That said, it's still a bit disappointing that geolocation support really isn't available in
ereaders at the present time. And what's even more unfortunate is that because the
Geolocation API is not technically part of the HTML5 specification (it's its own separate
W3C spec), it's also not technically a requirement of the EPUB 3 spec that ereaders
support the Geolocation API. And of course, geolocation support is arguably much
more controversial than support for Canvas, due to very legitimate concerns regarding
security and privacy .
Also potentially a bit controversial is whether the use of geolocation services in EPUB
runs counter to the specifications of the format, which maintain that all resources in-
cluded directly in the topic content need to be embedded directly in the EPUB file, and
referenced in the EPUB's manifest . The philosophy here is that whether the user is
online or offline, they should be able to access and view all the topic content; a lack of
Internet access should not cripple the reading experience. Does a geolocated work of
fiction violate this precept? The answer to this question is a bit subjective, and likely
depends on how integral a role geolocation plays in the topic content, the type of fall-
backs that are in place, etc.
Regardless, we've already reached a point on the Web where geolocation functionality
is omnipresent and often taken for granted. So it seems likely that EPUB content cre-
ators and ereader developers alike will be strongly motivated to move toward a future
that allows for geolocation-enhanced ebooks. The potential inherent in geolocated
travel and restaurant guides alone seems huge, not to mention the opportunites for
more avant-garde experimentation .
Bibliography/Additional Resources
Here's a list of additional Geolocation resources you may find useful:
 
Search WWH ::




Custom Search