[GIS] Openlayers: Clustering in Openlayers.Layer.Text

clusteringopenlayers-2

I have a map that displays 5 layers of markers. Each layer is a group of POI's. I load the POIs from textfiles using

var cycling = new OpenLayers.Layer.Text( "Cykling", { location:"./textfile.txt"} );
var hiking = new OpenLayers.Layer.Text( "Vandring", { location:"./textfile.txt"} );
var sailing = new OpenLayers.Layer.Text( "Kano & Kajak", { location:"./kano.txt"} );
var fishing = new OpenLayers.Layer.Text( "Lystfiskeri", { location:"./textfile.txt"} );
var sleeping = new OpenLayers.Layer.Text( "Overnatning", { location:"./textfile.txt"} );

I am trying to cluster the POIs if the map is zoomed out but at first glance it seems clustering is not available for OpenLayers.Layer.Text markers.

Can anyone point me in the right direction? What are my options for clustering?

Best Answer

You should add them as Vector layers with a Text Format. That's how you can get clustering, and it is the guidance in the OL documentation

The provided link has example to use GML with Text format, and also mentions use of Vector with Text format.