Adding Marker/Pushpin to selected Polygon

May 6, 2013 at 7:00 AM
Can anyone help me
i want to do something like this --->

but without points
i want to put marker inside a selected Polygon

thanks in advance
May 7, 2013 at 11:01 AM
Edited May 7, 2013 at 11:03 AM
I guess the best way to do it is to generated in-memory point shapefile with centers (centroids) of polygons and then to set icons like in the example. Here is some quick code how to do it (check naming for API members in documentation):
Shapefile sfNew = new Shapefile();
sfNew.Create("", ShpType.POINT);   // no filename = in-memory
 for(int i = 0; i < i sf.numShapes; i++) {
     Point pnt = sf.get_Shape(i).Centroid();
     Shape shp = new Shape();
// apply icons for sfNew