OpenLayers BBOX Strategy
This map has a 'Vector' layer fetching data with the 'text' format, and using
the 'BBOX strategy'. Data is requested from '
db2text.php', a script which
queries the database example.db and generates text in the format OpenLayers
can use to display lots of markers
The BBOX strategy means that OpenLayers will make new requests as you pan
around (if you pan far enough), with a 'bbox' parameter passed. db2text.php
then uses this to only fetch markers from the database for the desired
area. This solves problems seen in the
example without using BBOX.
Note there is an artificial delay of 3 seconds introduced, to help you
see which new data OpenLayers is fetching as you pan. When you release the mouse
button after dragging, some new markers appear immediately. These in fact are
already loaded by OpenLayers. Further afield, new markers will appear after 3
seconds, as they are retreived as a new bbox request.
view directly