View Single Post

  #4 (permalink)  
Old 08-28-2006
Wilfried Wilfried is offline
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,122
Hi,

This shows the pushpins in a shape:

Code:
    Loc = MP.ActiveMap.GetLocation(Lat, Lon, Alt);
    Shape s = MP.ActiveMap.Shapes.AddShape(GeoAutoShapeType.geoShapeRadius, Loc, 100, 100);
    s.Line.Weight = 0;
    s.Select();
    object o = 1;
    Recordset rs = MP.ActiveMap.DataSets.get_Item(ref o).QueryShape(s);
    rs.MoveFirst();
    while (!rs.EOF) {
        // here we have all pushpins
        rs.MoveNext();
    }
This move pushpins in a shape to a new dataset:

Code:
    MapPoint.DataSet InCircle = MP.ActiveMap.DataSets.AddPushpinSet("In circle");
    rs.MoveFirst();
    while (!rs.EOF) {
        rs.Pushpin.MoveTo(InCircle);
        rs.MoveNext();
    }
    o = "In circle";
    rs = MP.ActiveMap.DataSets.get_Item(ref o).QueryShape(s);
    rs.MoveFirst();
    while (!rs.EOF) {
        // here we have all pushpins
        rs.MoveNext();
    }
Reply With Quote