Skip to content

Commit

Permalink
docs: add clarifying examples for set filter method
Browse files Browse the repository at this point in the history
  • Loading branch information
oscarlorentzon committed Sep 20, 2019
1 parent 4f674fa commit d1c7dd8
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/viewer/Viewer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -754,12 +754,30 @@ export class Viewer extends EventEmitter {
*
* Clear the filter by setting it to null or empty array.
*
* Commonly used filter properties (see the {@link Node} class
* documentation for a full list of properties that can be used
* in a filter) and common use cases:
*
* ```
* fullPano // Show only full 360 panoramas or not
* organizationKey // Show images from one or several organizations
* sequenceKey // Show images from one or several sequences
* userKey // Show images from one or several users
* capturedAt // Show images from a certain time interval
* ```
*
* @param {FilterExpression} filter - The filter expression.
* @returns {Promise<void>} Promise that resolves after filter is applied.
*
* @example
* ```
* viewer.setFilter(["==", "sequenceKey", "<my sequence key>"]);
*
* // Other examples
* // viewer.setFilter(["==", "organizationKey", "<my organization key>"]);
* // viewer.setFilter(["in", "userKey", "<my user key #1>", "<my user key #2>"]);
* // viewer.setFilter(["==", "fullPano", true]);
* // viewer.setFilter([">=", "capturedAt", <my time stamp>]);
* ```
*/
public setFilter(filter: FilterExpression): when.Promise<void> {
Expand Down

0 comments on commit d1c7dd8

Please sign in to comment.