cluster analysis - changing openlayers clutter radius -
i used openlayers clustter strategy cluster dataset geoserver.
i used following code in styling of clusters.
var mystyle = new openlayers.style( { pointradius :20, fillcolor :'#ffff00', fillopacity :0.5, strokecolor :'#ffffff', strokewidth :2, strokeopacity :0.5 }); var mystylemap = new openlayers.stylemap( { "default" :mystyle });
this works nicely if write code in html pages , in jsp pages.
when want change cluster radius dynamically according data point count in each cluster had following change above code.
var mystyle = new openlayers.style( { pointradius :"${radius}", fillcolor :'#ffff00', fillopacity :0.5, strokecolor :'#ffffff', strokewidth :2, strokeopacity :0.5 }, { context : { radius: function(feature) { return math.min(feature.attributes.count, 7) +3;; } } }); var mystylemap = new openlayers.stylemap( { "default" :mystyle });
this woks fine, if write code in html page.
but, when wanna use above second code in jsp pages, gives me mozilla firebug error => unexpected value parsing r attributes.
can me?
thanks in advance!
from jsp2 spec should able escape el : ${'${'}radius}
in jsp page
good luck.
Comments
Post a Comment