A simple strategy that reads new features when the viewport invalidates some bounds.
OpenLayers. | A simple strategy that reads new features when the viewport invalidates some bounds. |
Properties | |
bounds | {OpenLayers.Bounds} The current data bounds (in the same projection as the layer - not always the same projection as the map). |
resolution | {Float} The current data resolution. |
ratio | {Float} The ratio of the data bounds to the viewport bounds (in each dimension). |
resFactor | {Float} Optional factor used to determine when previously requested features are invalid. |
response | {OpenLayers.Protocol.Response} The protocol response object returned by the layer protocol. |
Constructor | |
OpenLayers. | Create a new BBOX strategy. |
Functions | |
activate | Set up strategy with regard to reading new batches of remote data. |
deactivate | Tear down strategy with regard to reading new batches of remote data. |
update | Callback function called on “moveend” or “refresh” layer events. |
getMapBounds | Get the map bounds expressed in the same projection as this layer. |
invalidBounds | Determine whether the previously requested set of features is invalid. |
calculateBounds | |
triggerRead | {OpenLayers.Protocol.Response} The protocol response object returned by the layer protocol. |
createFilter | Returns {OpenLayers.Filter} The filter object. |
merge | Given a list of features, determine which ones to add to the layer. |
{OpenLayers.Bounds} The current data bounds (in the same projection as the layer - not always the same projection as the map).
{Float} Optional factor used to determine when previously requested features are invalid. If set, the resFactor will be compared to the resolution of the previous request to the current map resolution. If resFactor > (old / new) and 1/resFactor < (old / new). If you set a resFactor of 1, data will be requested every time the resolution changes. If you set a resFactor of 3, data will be requested if the old resolution is 3 times the new, or if the new is 3 times the old. If the old bounds do not contain the new bounds new data will always be requested (with or without considering resFactor).
{OpenLayers.Protocol.Response} The protocol response object returned by the layer protocol.
getMapBounds: function()
Get the map bounds expressed in the same projection as this layer.
{OpenLayers.Bounds} Map bounds in the projection of the layer.
invalidBounds: function( mapBounds )
Determine whether the previously requested set of features is invalid. This occurs when the new map bounds do not contain the previously requested bounds. In addition, if resFactor is set, it will be considered.
mapBounds | {OpenLayers.Bounds} the current map extent, will be retrieved from the map object if not provided |
{Boolean}
calculateBounds: function( mapBounds )
mapBounds | {OpenLayers.Bounds} the current map extent, will be retrieved from the map object if not provided |
triggerRead: function()
{OpenLayers.Protocol.Response} The protocol response object returned by the layer protocol.
createFilter: function()
Returns {OpenLayers.Filter} The filter object.
merge: function( resp )
Given a list of features, determine which ones to add to the layer. If the layer projection differs from the map projection, features will be transformed from the layer projection to the map projection.
resp | {OpenLayers.Protocol.Response} The response object passed by the protocol. |
Set up strategy with regard to reading new batches of remote data.
activate: function()
Tear down strategy with regard to reading new batches of remote data.
deactivate: function()
Callback function called on “moveend” or “refresh” layer events.
update: function( options )
Get the map bounds expressed in the same projection as this layer.
getMapBounds: function()
Determine whether the previously requested set of features is invalid.
invalidBounds: function( mapBounds )
calculateBounds: function( mapBounds )
{OpenLayers.Protocol.Response} The protocol response object returned by the layer protocol.
triggerRead: function()
Returns {OpenLayers.Filter} The filter object.
createFilter: function()
Given a list of features, determine which ones to add to the layer.
merge: function( resp )