©2009 Google -
Code Home -
Terms of Service -
Privacy Policy -
Site Directory
Google Code offered in:
English -
Español -
日本語 -
한국어 -
Português -
Pусский -
中文(简体) -
中文(繁體)
The Embedded Viewer API contains one class: DefaultViewer. For an introduction to using the API, see the Developer's Guide.
google.books.DefaultViewer(div, opt_options)
string
getPageNumber()
boolean
goToPage(pageNumber)
boolean
isLoaded()
highlight(opt_string)
load(identifiers, opt_notFoundCallback, opt_successCallback)
nextPage()
previousPage()
resize()
zoomIn()
zoomOut()
google.books.DefaultViewer(div, opt_options)
Element div - Div to draw the viewport in.
Object opt_options - Key-value map of options to pass along to the
viewer.
string getPageNumber()
string
boolean goToPage(pageNumber)
string, number pageNumber - The page number of the page to turn to.
boolean
boolean isLoaded()
load.
boolean
highlight(opt_string)
string opt_string - A string to highlight. Turns off highlighting if
null or undefined.
load(identifiers, opt_notFoundCallback, opt_successCallback)
string, Array of strings identifiers - A preview URL or book identifier such as an ISBN,
OCLC, etc. See Dynamic Links request format. To specify several alternative identifiers for the book (e.g., the hardcover and softcover ISBNs), pass an Array of these identifier strings; the viewer will the viewer will load the first embeddable book in the array.
Function opt_notFoundCallback - If identifier is a book
identifier, this callback will be called if the book was not found. If null passed or this
parameter is omitted, no function will be called on failure.
Function opt_successCallback - This callback will be executed
if and when the viewer is successfully instantiated with a particular book, and ready
to receive function calls such as nextPage.
nextPage()
previousPage()
resize()
zoomIn()
zoomOut()