Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

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.

share|improve this answer
    
Thanks Vadim. Your answer got me 1 stop closer! –  jgrau Dec 29 '11 at 10:19
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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