Quantcast
Viewing all articles
Browse latest Browse all 2341

New Post: length as a label ?

Certainly. With something like this:
    sf.Labels.Clear();

    for (int i = 0; i < sf.NumShapes; i++)
    {
        var shape = sf.Shape[i];
        var pnt = shape.Centroid;
        sf.Labels.AddLabel(shape.Length.ToString(), pnt.x, pnt.y);
    }

    axMap1.Redraw();
Use AxMap.GeodesicLength for precise calculations.

Hope it helps,
Sergei

Viewing all articles
Browse latest Browse all 2341

Trending Articles