Class PhotoRequest
Class that describes a request for a subset of photos.
A PhotoRequest defines a "result set". Given constraints on what photos we
want to seach for (for example, all photos in group "Snow") the result set is
the ordered list of photos that satisfy the constraint. Throughout the WAPI,
photos obtained as a result of a request are referenced through their
position in the result set, also called their "index". That is, photo at
position 5 in the result set for the query "popular photos" will be the 5th
most popular photo. This is to be distinguished from
- the Panoramio photo id of that photo
- the position of that photo in a particular HTTP request for photo
metadata (for example, if we already have metadata for photos in positions
0, 1, 2, and 3 in the result set, then we may later ask for metadata for
photos in positions 4, 5, 6 and 7 in the result set, but the photo in
position 5 in the result set will occupy position 2 in that particular HTTP
request).
Contrary to just a panoramio.PhotoRequestOptions object, if this is shared
among multiple widgets they will all show the same set of photos. Otherwise a
separate request will be done for each widget, and because some of these
requests have an element of randomness, the widgets may not show coordinated
photos.
Class Summary
| Constructor Attributes |
Constructor Name and Description |
| |
|
Class PhotoRequestOptions
A record to hold options for a PhotoRequest.
We define this mainly as a documentation tool, so we can clearly define what
fields such option records have. We don't expect users to actually build
objects of this class and pass them to PhotoRequest objects.
Field Summary
| Field Attributes |
Field Name and Description |
| |
Integer id of the Panoramio group to retrieve photos from.
|
| |
Explicit list of photos to request.
|
| |
Order that we should return the result in.
|
| |
Latitude-longitude rectangle that we should limit the results to.
|
| |
Panoramio photo set that we want to retrieve.
|
| |
Photo tag whose photos we want to retrieve.
|
| |
Panoramio user id of the user whose photos we want to retrieve.
|
Field Detail
{(number|undefined)}
group
Integer id of the Panoramio group to retrieve photos from.
{(Array.<Object>|undefined)}
ids
Explicit list of photos to request. The items of the array have to have two
fields, the "userId" field has to contain the Panoramio id, an integer, of
the photo owner and the "photoId" field has to contain the Panoramio photo
id, as an integer.
For example,
'ids': [{'userId': 187, 'photoId': 1000},
{'userId': 1, 'photoId': 31444256},
{'userId', 1, 'photoId': 30880260}}]
Order that we should return the result in.
This option is not valid if the 'rect' field is used, if the 'ids' field is
used, if the 'set' field is used, or if the 'tag' field is used but not the
'user' field. It defaults to DATE, which means from oldest to newest.
{({sw:{lat:number, lng:number}, ne:{lat:number, lng:number}}|undefined)}
rect
Latitude-longitude rectangle that we should limit the results to.
The 'ne' and 'sw' fields are the north-east and south-west corners of the
rectangle, respectively, and each point has a 'lat' and 'lng' field with the
latitude in degrees north and longitude in degrees east respectively (so
negative latitudes are in the southern hemisphere, and negative longitudes
are west of the Greenwith meridian). If a rectangle crosses the 180 degree
meridian, the longitude of its north-east corner will be smaller than that of
its south-west corner. This option is not valid if the 'ids' field is used,
if the 'order' field is used, or if the 'user' and 'tag' are used at the same
time, or if the 'user' and 'group' are used at the same time.
Panoramio photo set that we want to retrieve.
{(string|undefined)}
tag
Photo tag whose photos we want to retrieve.
{(number|undefined)}
user
Panoramio user id of the user whose photos we want to retrieve.
Class PhotoOrder
Constants for photo sorting options.
Field Summary
| Field Attributes |
Field Name and Description |
| <static> <constant> |
panoramio.PhotoOrder. DATE
For a request for all photos by a user (without a bounding box), sort the
result by date, from oldest to newest (this is the default order for these
requests).
|
| <static> <constant> |
For a request for all photos by a user (without a bounding box), sort the
result by date, from newest to oldest.
|
Field Detail
<static> <constant>
panoramio.PhotoOrder.DATE
For a request for all photos by a user (without a bounding box), sort the
result by date, from oldest to newest (this is the default order for these
requests).
<static> <constant>
panoramio.PhotoOrder.DATE_DESC
For a request for all photos by a user (without a bounding box), sort the
result by date, from newest to oldest.
Class PhotoSet
Constants for names of Panoramio photo sets.
Field Summary
| Field Attributes |
Field Name and Description |
| <static> <constant> |
All photos.
|
| <static> <constant> |
Only public photos.
|
| <static> <constant> |
Recently-added photos.
|
Field Detail
<static> <constant>
panoramio.PhotoSet.ALL
All photos.
<static> <constant>
panoramio.PhotoSet.PUBLIC
Only public photos.
<static> <constant>
panoramio.PhotoSet.RECENT
Recently-added photos.
Class InvalidPhotoRequestError
Exception class for invalid request types.
Method Summary
| Method Attributes |
Method Name and Description |
| |
Returns a textual form of this exception.
|
Method Detail
{string}
toString()
Returns a textual form of this exception.
- Returns:
- {string} Textual form of this exception.
Class Widget
Parent class for all widgets.
Currently, this class has two purposes:
- defines a parent type that can be used in type signatures when any
widget is needed, and
- defines code that is shared by the PhotoWidget and the PhotoListWidget.
Since currently these are the only two widgets, this is ok. Once we add more
widgets, it may make sense to split this into two classes, a Widget class
that acts as the hierarchy root, and a PhotoWidgetParent class that provides
shared code by those two widgets.
Method Summary
| Method Attributes |
Method Name and Description |
| |
Control the visibility and clicking behaviour of the "next" arrow.
|
| |
Control the visibility and clicking behaviour of the "previous" arrow.
|
| |
Returns whether we are at the end of the result set.
|
| |
Returns whether we are at the beginning of the result set.
|
Method Detail
enableNextArrow(enable)
Control the visibility and clicking behaviour of the "next" arrow.
This is meant to be called manually by the user.
- Parameters:
-
{boolean} enable
- Whether to enable (if true) or disable (if false) the
"next" or right/down-pointing arrow.
enablePreviousArrow(enable)
Control the visibility and clicking behaviour of the "previous" arrow.
This is meant to be called manually by the user.
- Parameters:
-
{boolean} enable
- Whether to enable (if true) or disable (if false) the
"previous" or left/up-pointing arrow.
{?boolean}
getAtEnd()
Returns whether we are at the end of the result set.
- Returns:
- {?boolean} Whether we are at the end of the result set, and
therefore cannot move forwards. Returns 'null' if a request has not yet
been defined, or we have not moved into it.
{?boolean}
getAtStart()
Returns whether we are at the beginning of the result set.
- Returns:
- {?boolean} Whether we are at the beginning of the result set, and
therefore cannot move backwards. Returns 'null' if a request has not yet
been defined, or we have not moved into it.
Class PhotoWidget
A widget that shows one photo at a time.
The 'setPosition' method needs to be called for the widget to start
displaying anything. This lets the user install handlers for the
PHOTO_CHANGED event after the widget is constructed but before the event is
raised.
This extends panoramio.Widget.
Class Summary
| Constructor Attributes |
Constructor Name and Description |
| |
|
Method Summary
| Method Attributes |
Method Name and Description |
| |
Gets the currently displayed photo.
|
| |
Gets the current position in the result set.
|
| |
Moves to a particular position in the result set.
|
| |
Sets or changes the request for a widget.
|
Class Detail
panoramio.PhotoWidget(element, opt_photoRequest, opt_options)
- Parameters:
-
{Element|string} element
- Existing HTML element (typically a 'div')
that this widget should be drawn into, or the DOM id of the element.
-
{panoramio.PhotoRequest|panoramio.PhotoRequestOptions|undefined} opt_photoRequest
- Request options or Request object to use as a source of
photos to be displayed in this widget. If none is given, the widget will
initially not show any photo.
-
{panoramio.PhotoWidgetOptions|undefined} opt_options
- Options for this
widget.
Method Detail
Gets the currently displayed photo.
- Returns:
- {?panoramio.Photo} The currently displayed photo or 'null' if the
widget is not fully initialized or the request is not defined. Note that
only after the panoramio.events.EventType.PHOTO_CHANGED event has been
raised will this return the new photo.
{?number}
getPosition()
Gets the current position in the result set.
- Returns:
- {?number} The current position in the result set (the first photo is
in position 0) or 'null' if the widget is not fully initialized. Note that
only after the panoramio.events.EventType.PHOTO_CHANGED event has been
raised will this return the new position.
setPosition(index)
Moves to a particular position in the result set.
If that photo is the one just before or after the current photo, a sliding
animation will be shown. If no request is defined, a blank photo area
will be shown. If the requested photo index does not exist in the result
buffer, there will be no change.
This method needs to be called for the widget to start displaying
anything. This lets the user install handlers for the PHOTO_CHANGED event
after the widget is constructed but before the event is raised.
Raises a panoramio.events.EventType.PHOTO_CHANGED event after the new photo
is displayed (or after it has been determined that there is no new photo to
display).
- Parameters:
-
{number} index
- Index of the photo to show; the first photo in the
result set is the 0th.
setRequest(photoRequest)
Sets or changes the request for a widget.
The source of photos to be displayed in the widget will be changed to this
new request. The photo being shown, if any, will not be changed by this
function; the user will need to manually call setPosition explicitly to show
a photo from the new set, or to switch to a blank panel if 'null' was passed
as the new set.
- Parameters:
-
{panoramio.PhotoRequest|panoramio.PhotoRequestOptions|null} photoRequest
- New request options or request object to use as a source of
photos for this widget, or 'null' if the widget should be shown empty. If a
panoramio.PhotoRequest object is used, the results will be shared among all
widgets that use that object; if a panoramio.PhotoRequestOptions record is
used, a separate request will be made for each widget.
- Throws:
-
{panoramio.InvalidPhotoRequestError}
- If 'photoRequestOptions' does
not describe a valid request.
Class PhotoWidgetOptions
A record to hold options for a PhotoWidget.
We define this mainly as a documentation tool, so we can clearly define what
fields such option records have. We don't expect users to actually build
objects of this class and pass them to PhotoWidget objects.
Field Summary
| Field Attributes |
Field Name and Description |
| |
What kind of ToS block we should display; defaults to DEFAULT.
|
| |
Whether we should display cropped photos.
|
| |
Which event bindings should not be created.
|
| |
Total widget height, in pixels; defaults to 300.
|
| |
Total widget width, in pixels; defaults to 400.
|
Field Detail
What kind of ToS block we should display; defaults to DEFAULT.
Whether we should display cropped photos. The value 'true' is synonym of
TO_SQUARE, and the value 'false' is synonym of NO_CROPPING. Defaults to
NO_CROPPING.
{(boolean|undefined|Array.<panoramio.events.EventType>)}
disableDefaultEvents
Which event bindings should not be created. If this is a list of event types,
it lists the event types that should not be listened to. The value 'true'
means 'disable all events'. The value 'false' and 'undefined' mean 'enable
all events'. This affects only the bindings to "behavioral" events such as
PHOTO_CLICKED and NEXT_CLICKED, not low-level ones such as 'click' on an
arrow.
The default behaviors are:
- PREVIOUS_CLICKED: Scroll one photo back.
- NEXT_CLICKED: Scroll one photo forward.
- PHOTO_CLICKED: Open a new Panoramio page for the selected photo.
{(number|undefined)}
height
Total widget height, in pixels; defaults to 300.
{(number|undefined)}
width
Total widget width, in pixels; defaults to 400.
Class PhotoListWidget
A widget that shows multiple photos at a time.
The 'setPosition' method needs to be called for the widget to start
displaying anything. This lets the user install handlers for the
PHOTO_CHANGED event after the widget is constructed but before the event is
raised.
A photo list widget contains several "slots" arranged in a grid. Each slot
displays a photo (or is empty). Slots are numbered from 0 to (rows * columns
- 1). The 0th slot is in the upper-left corner. In a horizontally-scrolling
widget, the slots are ordered from top to bottom in the inner loop, and from
left to right in the outer loop; in a vertically-scrolling widget,
left-to-right in the inner loop and top-to-bottom in the outer loop. Each
slot has a position in the result set, and displays the photo at that
position. The slots' positions increase as the slot number. The widget's
"position" is the position of its 0th slot.
This extends panoramio.Widget.
Class Summary
| Constructor Attributes |
Constructor Name and Description |
| |
|
Method Summary
| Method Attributes |
Method Name and Description |
| |
Gets the currently displayed photos.
|
| |
Gets the current position in the result set.
|
| |
Moves to a particular position in the result set.
|
| |
Sets or changes the request for a widget.
|
Class Detail
panoramio.PhotoListWidget(element, opt_photoRequest, opt_options)
- Parameters:
-
{Element|string} element
- Existing HTML element (typically a 'div')
that this widget should be drawn into, or the DOM id of the element.
-
{panoramio.PhotoRequest|panoramio.PhotoRequestOptions|undefined} opt_photoRequest
- Request options or Request object to use as a source of
photos to be displayed in this widget. If none is given, the widget will
initially not show any photo.
-
{panoramio.PhotoListWidgetOptions|undefined} opt_options
- Options for
this widget.
Method Detail
{Array.<?panoramio.Photo>}
getPhotos()
Gets the currently displayed photos.
- Returns:
- {Array.<?panoramio.Photo>} For each slot in the widget, the photo
displayed in that slot, or 'null' if no photo is shown at that slot (for
example because the widget is not fully initialized, or because the slot's
position in the result set is out of range). Note that only after the
panoramio.events.EventType.PHOTO_CHANGED event has been raised will this
return the new photos.
{?number}
getPosition()
Gets the current position in the result set.
- Returns:
- {?number} Position of the widget in the photo set. For this
multi-photo widget, the position is that of the photo shown in the first
slot (at the upper-left corner) except that it is possible for this to be a
negative number if we start showing results at a later slot and the first
few slots are blank. It will be 'null' if the widget is not fully
initialized. Note that only after the
panoramio.events.EventType.PHOTO_CHANGED event has been raised will this
return the new position.
setPosition(index)
Moves to a particular position in the result set.
If that position is close enough to the current one, a sliding animation will
be shown. If no request is defined, a blank photo area will be shown.
This method needs to be called for the widget to start displaying
anything. This lets the user install handlers for the PHOTO_CHANGED event
after the widget is constructed but before the event is raised.
Raises a panoramio.events.EventType.PHOTO_CHANGED event after the new photos
are displayed (or after it has been determined that there is no new photo to
display).
- Parameters:
-
{number} index
- Position in the result set of the new photo to show
in the first slot (the upper-left corner). All other slots are updated
accordingly. This number may be out of range of the result set and still
some photos may be displayed in later slots.
setRequest(photoRequest)
Sets or changes the request for a widget.
The source of photos to be displayed in the widget will be changed to this
new request. The photos being shown, if any, will not be changed by this
function; the user will need to manually call setPosition explicitly to show
a photo from the new set, or to switch to a blank panel if 'null' was passed
as the new set.
- Parameters:
-
{panoramio.PhotoRequest|panoramio.PhotoRequestOptions|null} photoRequest
- New request options or request object to use as a source of
photos for this widget, or 'null' if the widget should be shown empty. If a
panoramio.PhotoRequest object is used, the results will be shared among all
widgets that use that object; if a panoramio.PhotoRequestOptions record is
used, a separate request will be made for each widget.
- Throws:
-
{panoramio.InvalidPhotoRequestError}
- If 'photoRequestOptions' does
not describe a valid request.
Class PhotoListWidgetOptions
A record to hold options for a PhotoListWidget.
We define this mainly as a documentation tool, so we can clearly
define what fields such option records have. We don't expect users
to actually build objects of this class and pass them to PhotoListWidget
objects.
Field Summary
| Field Attributes |
Field Name and Description |
| |
What kind of ToS block we should display; defaults to DEFAULT.
|
| |
Number of columns in the widget; defaults to 5.
|
| |
Whether we should display cropped photos.
|
| |
Which event bindings should not be created.
|
| |
Total widget height, in pixels; defaults to 150.
|
| |
Widget orientation.
|
| |
Number of rows in the widget; defaults to 1.
|
| |
Total widget width, in pixels; defaults to 750.
|
Field Detail
What kind of ToS block we should display; defaults to DEFAULT.
{(number|undefined)}
columns
Number of columns in the widget; defaults to 5.
Whether we should display cropped photos. The value 'true' is synonym of
TO_SQUARE, and the value 'false' is synonym of NO_CROPPING. Defaults to
NO_CROPPING.
{(boolean|undefined|Array.<panoramio.events.EventType>)}
disableDefaultEvents
Which event bindings should not be created. If this is a list of event types,
it lists the event types that should not be listened to. The value 'true'
means 'disable all events'. The value 'false' and 'undefined' mean 'enable
all events'. This affects only the bindings to "behavioral" events such as
PHOTO_CLICKED and NEXT_CLICKED, not low-level ones such as 'click' on an
arrow.
The default behaviors are:
- PREVIOUS_CLICKED: Scroll one page back.
- NEXT_CLICKED: Scroll one page forward.
- PHOTO_CLICKED: Open a new Panoramio page for the selected photo.
{(number|undefined)}
height
Total widget height, in pixels; defaults to 150.
Widget orientation. This determines where the arrows will be drawn
and how the widget will scroll. It does not change the meaning of
the 'rows' and 'columns' properties; defaults to HORIZONTAL.
{(number|undefined)}
rows
Number of rows in the widget; defaults to 1.
{(number|undefined)}
width
Total widget width, in pixels; defaults to 750.
Class PhotoListWidgetOptions.Orientation
Constants for widget orientation.
Field Summary
| Field Attributes |
Field Name and Description |
| <static> <constant> |
panoramio.PhotoListWidgetOptions.Orientation. HORIZONTAL
Widget scrolls horizontally.
|
| <static> <constant> |
panoramio.PhotoListWidgetOptions.Orientation. VERTICAL
Widget scrolls vertically.
|
Field Detail
<static> <constant>
panoramio.PhotoListWidgetOptions.Orientation.HORIZONTAL
Widget scrolls horizontally.
<static> <constant>
panoramio.PhotoListWidgetOptions.Orientation.VERTICAL
Widget scrolls vertically.
Namespace events
Namespace Summary
| Constructor Attributes |
Constructor Name and Description |
| |
|
Method Summary
| Method Attributes |
Method Name and Description |
| <static> |
panoramio.events. listen(src, type, listener, opt_capt, opt_handler)
Expose Closure's goog.events.listen: Adds an event listener for an event on a
DOM node or an object that has implemented eventTarget.
|
| <static> |
panoramio.events. unlisten(src, type, listener, opt_capt, opt_handler)
Expose Closure's goog.events.unlisten: Removes an event listener which was
added with listen().
|
| <static> |
Expose Closure's goog.events.unlistenByKey: Removes an event listener which
was added with listen() by the key returned by listen().
|
Namespace Detail
panoramio.events
Method Detail
<static>
{?number}
panoramio.events.listen(src, type, listener, opt_capt, opt_handler)
Expose Closure's goog.events.listen: Adds an event listener for an event on a
DOM node or an object that has implemented eventTarget. A
listener can only be added once to an object and if it is added again the key
for the listener is returned.
- Parameters:
-
event_target src
- The node to listen to
events on.
-
{string|Array.<string>} type
- Event type or array of event types.
-
{function(event)|Object} listener
- Callback method, or an
object with a handleEvent function.
-
{boolean|undefined} opt_capt
- In DOM-compliant browsers, this
determines whether the listener is fired during the capture or bubble phase
of the event.
-
{Object|undefined} opt_handler
- Element in whose scope to call the
listener.
- Returns:
- {?number} Unique key for the listener.
<static>
{?boolean}
panoramio.events.unlisten(src, type, listener, opt_capt, opt_handler)
Expose Closure's goog.events.unlisten: Removes an event listener which was
added with listen().
- Parameters:
-
event_target src
- The target to stop
listening to events on.
-
{string|Array.<string>} type
- The name of the event without the 'on'
prefix.
-
{function(event)|Object} listener
- The listener function
or object to remove.
-
{boolean|undefined} opt_capt
- In DOM-compliant browsers, this
determines whether the listener is fired during the capture or bubble phase
of the event.
-
{Object|undefined} opt_handler
- Element in whose scope to call the
listener.
- Returns:
- {?boolean} indicating whether the listener was there to remove.
<static>
{boolean}
panoramio.events.unlistenByKey(key)
Expose Closure's goog.events.unlistenByKey: Removes an event listener which
was added with listen() by the key returned by listen().
- Parameters:
-
{?number} key
- The key returned by listen() for this event listener.
- Returns:
- {boolean} indicating whether the listener was there to remove.
Class events.EventType
Constants for event names.
Field Summary
| Field Attributes |
Field Name and Description |
| <static> |
The "next" arrow was clicked.
|
| <static> |
The photo(s) shown in a widget have changed.
|
| <static> |
A photo was clicked.
|
| <static> |
The "previous" arrow was clicked.
|
Field Detail
<static>
panoramio.events.EventType.NEXT_CLICKED
The "next" arrow was clicked. The target of this event will be a widget
object.
<static>
panoramio.events.EventType.PHOTO_CHANGED
The photo(s) shown in a widget have changed. The target of this event will
be a widget object.
<static>
panoramio.events.EventType.PHOTO_CLICKED
A photo was clicked. This event will be an object of type
PhotoClickedEvent.
<static>
panoramio.events.EventType.PREVIOUS_CLICKED
The "previous" arrow was clicked. The target of this event will be a widget
object.
Class events.PhotoClickedEvent
Class for "a photo was clicked" event.
For such events, the target will be a widget object.
Method Summary
| Method Attributes |
Method Name and Description |
| |
Returns the Photo object for the photo that was clicked.
|
| |
Returns the position of the clicked photo in its widget's result set.
|
Method Detail
Returns the Photo object for the photo that was clicked.
- Returns:
- {panoramio.Photo} The photo that was clicked.
{?number}
getPosition()
Returns the position of the clicked photo in its widget's result set.
- Returns:
- {?number} The position of the photo in the widget's result set, or
'null' if it cannot be determined.
Class Photo
Class that describes a Panoramio Photo. This is only metadata about the
photo, i.e. available sizes, photo id, title, owner, ... but it does not
include pixels.
Method Summary
| Method Attributes |
Method Name and Description |
| |
Returns the natural height of this photo.
|
| |
Returns the Panoramio user id of the author of this photo.
|
| |
Returns the name of the author of this photo.
|
| |
Returns a Panoramio URL for the author of this photo.
|
| |
Returns the Panoramio photo id of this photo.
|
| |
Returns the title of this photo.
|
| |
Returns a Panoramio URL for this photo.
|
| |
Returns the position where the photo was taken, if known.
|
| |
Returns the natural width of this photo.
|
Method Detail
{?number}
getHeight()
Returns the natural height of this photo.
- Returns:
- {?number} The natural height of this photo, in pixels, for the full
size version, oriented as the photo is to be displayed.
{?number}
getOwnerId()
Returns the Panoramio user id of the author of this photo.
- Returns:
- {?number} The Panoramio user id of the author of this photo.
{string}
getOwnerName()
Returns the name of the author of this photo.
- Returns:
- {string} The name of the author of this photo.
{?string}
getOwnerUrl()
Returns a Panoramio URL for the author of this photo.
- Returns:
- {?string} The URL for the Panoramio user page for the author of this
photo.
{?number}
getPhotoId()
Returns the Panoramio photo id of this photo.
- Returns:
- {?number} The Panoramio photo id of this photo.
{string}
getPhotoTitle()
Returns the title of this photo.
- Returns:
- {string} The title of this photo.
{?string}
getPhotoUrl()
Returns a Panoramio URL for this photo.
- Returns:
- {?string} The URL for the Panoramio photo page for this photo.
Returns the position where the photo was taken, if known.
- Returns:
- {?panoramio.Coordinates} The position where the photo was taken, or
'null' if it is not known.
{?number}
getWidth()
Returns the natural width of this photo.
- Returns:
- {?number} The natural width of this photo, in pixels, for the full
size version, oriented as the photo is to be displayed.
Class Coordinates
A record to hold a latitude-longitude pair.
We define this mainly as a documentation tool, so we can clearly define what
fields such option records have. We don't expect users to actually build
objects of this class.
Field Summary
| Field Attributes |
Field Name and Description |
| |
Latitude, in degrees North, as a value in [-90, 90].
|
| |
Longitude, in degrees East, as a value in [-180, 180].
|
Field Detail
{number}
lat
Latitude, in degrees North, as a value in [-90, 90].
{number}
lng
Longitude, in degrees East, as a value in [-180, 180].
Class Cropping
Constants for photo cropping.
Field Summary
| Field Attributes |
Field Name and Description |
| <static> <constant> |
The photos are not cropped.
|
| <static> <constant> |
The photos are cropped to fill entirely the image viewport.
|
| <static> <constant> |
The photos are cropped to square.
|
Field Detail
<static> <constant>
panoramio.Cropping.NO_CROPPING
The photos are not cropped.
<static> <constant>
panoramio.Cropping.TO_FILL
The photos are cropped to fill entirely the image viewport.
<static> <constant>
panoramio.Cropping.TO_SQUARE
The photos are cropped to square.
Namespace tos
Namespace Summary
| Constructor Attributes |
Constructor Name and Description |
| |
|
Namespace Detail
panoramio.tos
Class tos.Style
Styles for display of a ToS block.
This is the block shown next to a widget, which contains the Panoramio logo
and the phrase "Photos provided by Panoramio are under the copyright of their
owners".
Field Summary
| Field Attributes |
Field Name and Description |
| <static> <constant> |
Default style.
|
| <static> <constant> |
Default style.
|
| <static> <constant> |
Not shown.
|
Field Detail
<static> <constant>
panoramio.tos.Style.DEFAULT
Default style. The widget will be reduced in size so that, together with
the attribution block, we have the requested size.
<static> <constant>
panoramio.tos.Style.DEFAULT_ADD
Default style. The attribution block will be added to the widget, which
will be drawn in the requested size, so the two of them together will take
more size than initially requested by the user.
<static> <constant>
panoramio.tos.Style.HIDDEN
Not shown. Note that, according to the ToS, at least one widget in a page
must have a visible ToS block.
Class TermsOfServiceWidget
A widget that just displays an attribution block.
This is made into a separate widget so that users can manually specify where
the attribution block should be positioned, in case they want to.
Class Summary
| Constructor Attributes |
Constructor Name and Description |
| |
|
Method Summary
| Method Attributes |
Method Name and Description |
| |
Returns the height of this widget.
|
Class Detail
panoramio.TermsOfServiceWidget(element, opt_options)
- Parameters:
-
{Element|string} element
- Existing HTML element (typically a 'div')
that this widget should be drawn into, or the DOM id of the element.
-
{panoramio.TermsOfServiceWidgetOptions|undefined} opt_options
- Options
for this widget.
Method Detail
{number}
getHeight()
Returns the height of this widget. This can be used to correctly size the
remaining widgets.
- Returns:
- {number} The height of this widget, in pixels.
Class TermsOfServiceWidgetOptions
A record to hold options for an attribution Widget.
We define this mainly as a documentation tool, so we can clearly define what
fields such option records have. We don't expect users to actually build
objects of this class and pass them to PhotoWidget objects.
Field Summary
| Field Attributes |
Field Name and Description |
| |
Total widget width, in pixels; defaults to 400.
|
Field Detail
{(number|undefined)}
width
Total widget width, in pixels; defaults to 400.
Class TermsOfServiceViolationError
Exception class for violations of Terms of Service.
Method Summary
| Method Attributes |
Method Name and Description |
| |
Returns a textual form of this exception.
|
Method Detail
{string}
toString()
Returns a textual form of this exception.
- Returns:
- {string} Textual form of this exception.