Skip to content

Instantly share code, notes, and snippets.

@jorix
Created April 8, 2013 14:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jorix/6c74f35a5700e194ebd7 to your computer and use it in GitHub Desktop.
Save jorix/6c74f35a5700e194ebd7 to your computer and use it in GitHub Desktop.
clusterStyle (castefa)
var clusterStyle = new OpenLayers.StyleMap({ // l'estil
'default': new OpenLayers.Style({
fillColor: 'red',
fillOpacity: 0.5,
strokeColor: 'red',
strokeOpacity: 0.9,
strokeWidth: 2,
pointRadius: '${radius}',
label: '${count}',
labelOutlineWidth: 1,
fontColor: "#222",
fontWeight: "bold",
//fontStrokeColor: "#222", fontStrokeWidth: 1, fontOpacity: 0.8,
fontSize: "10px"
}, {
context: {
radius: function(feature) {
var num = feature.attributes.count;
return Math.log(num)*9+2;
}
}
}),
'select': {fillColor: '#8aeeef'}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment