How to delete a vertex of a line(or polygon)?
How to delete a vertex of a line?
Omh)))
With button "delete"
But
1) how to make deleting with help of a mouse(Certainly first it will be put in to deleting vertex mode)
2) how to change the color of selected vertex in a line?
Hi Artem,
Does your issue here is in Edit Mode? If it is, you can delete the vertex by mouse down on a vertex and press “delete” button. It works for all geometry except PointShape for it has only one point.
You can change the color by the following client script and we’ll make it as server API in the further version.// ‘default’ : the shape style for drawing shapes on the client.
// ‘select’ : the shape style for editing shapes on the client.
var OnMapCreated = function(map) {
OpenLayers.Feature.Vector.style = {
'default': {
fillColor: "red",
fillOpacity: 0.4,
hoverFillColor: "white",
hoverFillOpacity: 0.8,
strokeColor: "red",
strokeOpacity: 1,
strokeWidth: 1,
strokeLinecap: "round",
strokeDashstyle: "solid",
hoverStrokeColor: "red",
hoverStrokeOpacity: 1,
hoverStrokeWidth: 0.2,
pointRadius: 6,
hoverPointRadius: 1,
hoverPointUnit: "%",
pointerEvents: "visiblePainted",
cursor: "inherit"
},
'select': {
fillColor: "white",
fillOpacity: 0.4,
hoverFillColor: "white",
hoverFillOpacity: 0.8,
strokeColor: "white",
strokeOpacity: 1,
strokeWidth: 2,
strokeLinecap: "round",
strokeDashstyle: "solid",
hoverStrokeColor: "red",
hoverStrokeOpacity: 1,
hoverStrokeWidth: 0.2,
pointRadius: 6,
hoverPointRadius: 1,
hoverPointUnit: "%",
pointerEvents: "visiblePainted",
cursor: "pointer"
}
};
}
When you switch from drawing mode to editing mode, the color is rewrite by us; you need to set the server style of EditOverlay, such as Map1.EditOverlay.Style….
Hope it helps, if you have any questions please let me know.
Thanks,
Howard