Hi,

I'm trying to have a point radius dependant on the scale. Thus I have
created a Style with a context like this :

 var holeStyle = new OpenLayers.Style({
        fillColor: "#FF0000",
        pointRadius: "${scaledSize}",
        fillOpacity: 0.8,
        strokeColor: "#FF0000",
        strokeWidth: 2,
        strokeOpacity: 0.8

    }, {
        context: {
            scaledSize: function(feature) {
                var res = feature.layer.map.getResolution() ;
              // radius is fixed at 10 meters for the test
                var val =  (1 /res) * 10 ;
                return val;
            }
        }
    });

In Firebug, I get the following error when loading the layer : 

"unexpected value $ parsing r attribute."

I'm using OpenLayers 2.7.

Any idea on the cause of the problem ?

Thanks

Didrik

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users

Reply via email to