OpenLayers Vector Behavior Example

# Dynamic POIs via a Text Layer

poi, dynamic data, text, format, strategy, popup, select, selection

Loading dynamic data from a text file.

The vector layer shown uses the BBOX strategy, the HTTP protocol, and the Text format. This setup appends "?bbox=west,south,east,north" to every request. This allows you to configure the location as something like 'textfile.php', and take the '?bbox=' parameter to select data from a database or the like.

There is nothing about this example that limits it to text files; you can do the same thing with KML, GeoJSON, etc.

This is an alternative to something like the OpenStreetMap "Dynamic POI" example. The Layer is a standard vector layer, and interaction can be configured via the SelectFeature control, as you can see in the latter half of the code, which allows you to open a popup when a feature is selected.