Erstmal vielen Dank an Netzwolf, wambacher und ikonor für die tolle Hilfe… :slight_smile:

Leicht abgeändert funktioniert es nun… :slight_smile:

        styleMap: new OpenLayers.StyleMap
        ({
            'default': new OpenLayers.Style
            ({
                externalGraphic: '${icon}.png',
                graphicWidth: 26,
                graphicHeight: 26,
            }),
            
            'select': new OpenLayers.Style
            ({
                backgroundGraphic: 'bg.png',
                backgroundHeight: 20,
                backgroundWidth: '${getBackgroundWidth}',
                backgroundYOffset: 15,
                label: '${ziel}',
                labelYOffset: -30,
                labelAlign: 'cb',
                fontFamily: 'Arial',
                fontSize: 15,
                cursor: 'pointer'
            },{
                context:
                {
                    getBackgroundWidth: function(feature)
                    {
                        return(feature.attributes.ziel.length * 7.5);
                    }
                }
            })
        })

Nur ist es wirklich so, wie Netzwolf es vermutet hat:

Jetzt muß ich nur noch ne Möglichkeit finden, anstelle der Zeichenanzahl die Pixelbreite zu erhalten.
Dann passts optimal.
Jemand ne Idee??? :stuck_out_tongue:

http://tinyurl.com/7kgejy7

Gruß Wayne