OpenLayers.Strategy.Paging - OpenLayers

# OpenLayers. Strategy. Paging

Strategy for vector feature paging

#### Inherits from

- OpenLayers.Strategy

Summary

OpenLayers. Strategy. Paging | Strategy for vector feature paging
Properties |
layer | {OpenLayers.Layer.Vector} The layer that this strategy is assigned to.
features | {Array(OpenLayers.Feature.Vector)} Cached features.
length | {Integer} Number of features per page.
num | {Integer} The currently displayed page number.
paging | {Boolean} The strategy is currently changing pages.
Constructor |
OpenLayers. Strategy. Paging | Create a new paging strategy.
Functions |
activate | Activate the strategy.
deactivate | Deactivate the strategy.
cacheFeatures | Cache features before they are added to the layer.
clearCache | Clear out the cached features.
pageCount | Get the total count of pages given the current cache of features.
pageNum | Get the zero based page number.
pageLength | Gets or sets page length.
pageNext | Display the next page of features.
pagePrevious | Display the previous page of features.
page | Display the page starting at the given index from the cache.

### Properties

### layer

{OpenLayers.Layer.Vector} The layer that this strategy is assigned to.

### features

{Array(OpenLayers.Feature.Vector)} Cached features.

### length

{Integer} Number of features per page. Default is 10.

### num

{Integer} The currently displayed page number.

### paging

{Boolean} The strategy is currently changing pages.

### Constructor

### OpenLayers. Strategy. Paging

Create a new paging strategy.

#### Parameters

options | {Object} Optional object whose properties will be set on the instance.

### Functions

### activate

> activate: function()

Activate the strategy. Register any listeners, do appropriate setup.

#### Returns

{Boolean} The strategy was successfully activated.

### deactivate

> deactivate: function()

Deactivate the strategy. Unregister any listeners, do appropriate tear-down.

#### Returns

{Boolean} The strategy was successfully deactivated.

### cacheFeatures

> cacheFeatures: function( | event | )

Cache features before they are added to the layer.

#### Parameters

event | {Object} The event that this was listening for. This will come with a batch of features to be paged.

### clearCache

> clearCache: function()

Clear out the cached features. This destroys features, assuming nothing else has a reference.

### pageCount

> pageCount: function()

Get the total count of pages given the current cache of features.

#### Returns

{Integer} The page count.

### pageNum

> pageNum: function()

Get the zero based page number.

#### Returns

{Integer} The current page number being displayed.

### pageLength

> pageLength: function( | newLength | )

Gets or sets page length.

#### Parameters

newLength: {Integer} Optional length to be set.

#### Returns

{Integer} The length of a page (number of features per page).

### pageNext

> pageNext: function( | event | )

Display the next page of features.

#### Returns

{Boolean} A new page was displayed.

### pagePrevious

> pagePrevious: function()

Display the previous page of features.

#### Returns

{Boolean} A new page was displayed.

### page

> page: function( | start,
> | event | )

Display the page starting at the given index from the cache.

#### Returns

{Boolean} A new page was displayed.

Instances of OpenLayers.Layer.Vector are used to render vector data from a variety of sources.
Vector features use the OpenLayers.Geometry classes as geometry description.

> activate: function()

Activate the strategy.

> deactivate: function()

Deactivate the strategy.

> cacheFeatures: function( | event | )

Cache features before they are added to the layer.

> clearCache: function()

Clear out the cached features.

> pageCount: function()

Get the total count of pages given the current cache of features.

> pageNum: function()

Get the zero based page number.

> pageLength: function( | newLength | )

Gets or sets page length.

> pageNext: function( | event | )

Display the next page of features.

> pagePrevious: function()

Display the previous page of features.

> page: function( | start,
> | event | )

Display the page starting at the given index from the cache.
Abstract vector layer strategy class.
Close