Export Polyline to KMl

826
0
11-25-2013 08:54 AM
JuanBalaguera
New Contributor
I am trying to export a polyline to KML and I haven't found a way of doing it. I would like to know if it is not possible to do it directly, how to convert a polyline to a layer so I can use ESRI.ArcGIS.ConversionTools.LayerToKML. I created the polyline with the following code

  public void Contour(object data, int color, int bReDraw)
        {
            try
            {
                IPointCollection polylineCol = new Polyline();
                float[] arr = (float[])data;
                IPoint pt;
                for (int i = 0; i < arr.Length - 1; i++)
                {
                    pt = new ESRI.ArcGIS.Geometry.Point();
                    pt.Y = arr[i++];
                    pt.X = arr;
                    polylineCol.AddPoints(1, ref pt);
                }
             .......
0 Kudos
0 Replies