-
-
Save jorix/6c74f35a5700e194ebd7 to your computer and use it in GitHub Desktop.
clusterStyle (castefa)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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