1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
styleMap:new OpenLayers.StyleMap({
"default": new OpenLayers.Style({
fillColor: "#FFFF00",
fillOpacity: 1,
strokeColor: "#000000",
strokeWidth: 5,
graphicZIndex: "${zIndex}",
graphicName: "triangle",
pointRadius: 8,
label:"${getName}",
labelAlign: "rb",
labelXOffset: -20,
labelYOffset: -20,
labelBackgroundColor: "#FFFF00",
labelBorderColor: "black",
labelBorderSize: "1px",
fontColor: "black",
fontWeight: "bold",
fontSize: "14px",
fontFamily: "Courier New, monospace"
},
{
context:{
getName: function(f) {
if (f.attributes['typeName']=='wpt') {
return f.attributes['name'];
}
return '';
}
}
})
// suppression temporaire du style pour l'état "select"
}), |
Partager