Hi woorhtks,
to start edit shapefile this code is enough:
Regards,
Sergei
to start edit shapefile this code is enough:
private void button1_Click(object sender, EventArgs e)
{
axMap1.CursorMode = tkCursorMode.cmEditShape;
var sf = new Shapefile();
if (sf.Open(@"d:\data\sf\buildings.shp", null))
{
sf.InteractiveEditing = true;
axMap1.AddLayer(sf, true);
}
else
{
MessageBox.Show("Failed to open shapefile");
}
}
ChooseLayer event is not needed for cmEditShape (the document hinted that by mistake). All you need is just click on a shape and start dragging its vertices. It's possible to move individual vertices of shape but not a line segments (i.e. 2 vertices at once). It's also possible to move a shape as a whole with cmEditShape cursor (simply drag it by clicking anywhere outside the vertices). You can check what operations are supported by editor in the demo app. By default it's installed as C:\dev\mapwingis\mapwindowlite\mapwidowlite.exe. Some description of it is here: here.Regards,
Sergei