I want a custom vertex and polygon style for the Control.ModifyFeature. I want to keep the default fillColor of the polygon while editing it, not the blue. I thought this code will work but the blue is still there.
var shapeStyle = {
strokeOpacity: 1,
strokeWidth: 1,
fillColor: colorPoly,
fillOpacity: 0.45,
}
var shapeStyle2 = {
strokeOpacity: 1,
strokeWidth: 1,
fillColor: colorPoly,
fillOpacity: 0.45,
pointRadius: 3,
}
var styleMap = new OpenLayers.StyleMap({
"default": shapeStyle,
"vertex": shapeStyle2
}, {extendDefault: false});
var newShape = new OpenLayers.Layer.Vector( "Editable",{
styleMap: styleMap
});
var edit = new OpenLayers.Control.ModifyFeature(newShape,
{
title: "Modify Feature",
displayClass: "olControlModifyFeature",
styleMap: "default",
vertexRenderIntent: "vertex"
});
colorPoly is the variable containing the #color_code.
