@ stephan75: thanks for an answer :slight_smile:

Ahh, I solved it in a way :roll_eyes:

I saw on the ‘http://openlayers.org/dev/examples/’ site examples of ‘cluster’ that you mentioned.
I didn’t know that it was called in this way.
I used the ‘Cluster Strategy Threshold’ examples as base and added in the display handler a java script function that is moving the markers.


var flipFlop = 0;
function display(event) {
    if (event.feature.cluster)
    {
        if (flipFlop== 0)
        {
            flipFlop = 1;
            spread(event.feature);
        }else
        {
            flipFlop = 0;
            // move all markers to start point
            .......
        }
    }
}

var d = 15;
function spread(f) {
    var sphere = 1;
    var inSphereCnt = 0;
    var prtMarkerCnt = 0;
    do {
        var numberOfElementsInSphere = Math.floor((2 * Math.PI * sphere * d) / d);
        var alphaBase = 2 * Math.PI / numberOfElementsInSphere;
        do {
            var alpha = alphaBase * inSphereCnt;
            var r = d * sphere;
            var x = Math.sin(alpha) * r;
            var y = Math.cos(alpha) * r;

            var fid = f.cluster[prtMarkerCnt].fid;
            var pos = layerMarker.markers[fid].lonlat;
            var newPx = map.getLayerPxFromLonLat(pos);
            newPx.x += x;
            newPx.y += y;
            layerMarker.markers[fid].moveTo(newPx);
            inSphereCnt++;
            prtMarkerCnt++;
        } while (
            (inSphereCnt < numberOfElementsInSphere) &&
            (prtMarkerCnt < f.attributes.count)
        );
        sphere++;
        inSphereCnt = 0;
        cnt = 0;
    } while (prtMarkerCnt < f.attributes.count);
}

So it seams that i use Openlayer. I have no experience with leaflet or khtml.
We moved from google maps/ earth to open street map because we whant to ovide any licence problems.
Would leaflet or khtml be a better choise than open layer?

With best regards,