OpenSpace.Strategy.BBOXCache

Used to control the fetching of boundary data depending on the map window’s bounding box.  It uses a more experimental caching sceme than OpenSpace.Strategy.BBOX.

Inherits from

  • <OpenLayers.Strategy.BBOX>
Summary
OpenSpace.Strategy.BBOXCacheUsed to control the fetching of boundary data depending on the map window’s bounding box.
Properties
bounds{<OpenLayers.Bounds>} The current data bounds.
ratio{Float} The ratio of the data bounds to the viewport bounds (in each dimension).
response{<OpenLayers.Protocol.Response>} The protocol response object returned by the layer protocol.
Constructor
OpenSpace.Strategy.BBOXCreate a new BBOXCache strategy.
Functions
activateSet up strategy with regard to reading new batches of remote data.
deactivateTear down strategy with regard to reading new batches of remote data.
updateCallback function called on “moveend” or “refresh” layer events.
invalidBounds
calculateBounds
triggerReadWithoutGeometry{<OpenLayers.Protocol.Response>} The protocol response object returned by the layer protocol.
createFilterReturns {<OpenLayers.Filter>} The filter object.
cacheFeaturesGiven a list of features, determine which ones to request geometry for.
triggerReadWithGeometry{<OpenLayers.Protocol.Response>} The protocol response object returned by the layer protocol.
mergeGiven a list of features, determine which ones to add to the layer.

Properties

bounds

{<OpenLayers.Bounds>} The current data bounds.

ratio

{Float} The ratio of the data bounds to the viewport bounds (in each dimension).

response

{<OpenLayers.Protocol.Response>} The protocol response object returned by the layer protocol.

Constructor

OpenSpace.Strategy.BBOX

Create a new BBOXCache strategy.

Parameters

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

Functions

activate

activate: function()

Set up strategy with regard to reading new batches of remote data.

Returns

{Boolean} The strategy was successfully activated.

deactivate

deactivate: function()

Tear down strategy with regard to reading new batches of remote data.

Returns

{Boolean} The strategy was successfully deactivated.

update

update: function(options)

Callback function called on “moveend” or “refresh” layer events.

Parameters

options{Object} An object with a property named “force”, this property references a boolean value indicating if new data must be incondtionally read.

invalidBounds

invalidBounds: function(mapBounds)

Parameters

mapBounds{<OpenLayers.Bounds>} the current map extent, will be retrieved from the map object if not provided

Returns

{Boolean}

calculateBounds

calculateBounds: function(mapBounds)

Parameters

mapBounds{<OpenLayers.Bounds>} the current map extent, will be retrieved from the map object if not provided

triggerReadWithoutGeometry

triggerReadWithoutGeometry: function()

Returns

{<OpenLayers.Protocol.Response>} The protocol response object returned by the layer protocol.

createFilter

createFilter: function()

Returns {<OpenLayers.Filter>} The filter object.

cacheFeatures

cacheFeatures: function(resp)

Given a list of features, determine which ones to request geometry for.

Parameters

resp{<OpenLayers.Protocol.Response>} The response object passed by the protocol.

triggerReadWithGeometry

triggerReadWithGeometry: function(new_admin_unit_ids)

Returns

{<OpenLayers.Protocol.Response>} The protocol response object returned by the layer protocol.

merge

merge: function(resp)

Given a list of features, determine which ones to add to the layer.

Parameters

resp{<OpenLayers.Protocol.Response>} The response object passed by the protocol.
activate: function()
Set up strategy with regard to reading new batches of remote data.
deactivate: function()
Tear down strategy with regard to reading new batches of remote data.
update: function(options)
Callback function called on “moveend” or “refresh” layer events.
invalidBounds: function(mapBounds)
calculateBounds: function(mapBounds)
triggerReadWithoutGeometry: function()
{OpenLayers.Protocol.Response} The protocol response object returned by the layer protocol.
createFilter: function()
Returns {OpenLayers.Filter} The filter object.
cacheFeatures: function(resp)
Given a list of features, determine which ones to request geometry for.
triggerReadWithGeometry: function(new_admin_unit_ids)
{OpenLayers.Protocol.Response} The protocol response object returned by the layer protocol.
merge: function(resp)
Given a list of features, determine which ones to add to the layer.
Close