4

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?

2

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.