Quantcast
Viewing all articles
Browse latest Browse all 2341

New Post: I want Edit Shape

sleschinski wrote:
Hi woorhtks,

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
HI sleschinski,

Thanks answers.

but, I still do not. TT

mouse cursor changes.

Click on this no.

Drag is also no.

"Edit layer" press "vertex edit" enabled in "mapwidowlite.exe"

In the code I have.

thanks ^^

Viewing all articles
Browse latest Browse all 2341

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>