Example #1
0
        public static int MapTripWaypoints(List <TripWaypoint> waypoints, out int shpIndex, out List <int> handles, GPS gps, string filename, bool showInMap = true)
        {
            shpIndex = -1;
            handles  = new List <int>();
            var utils       = new MapWinGIS.Utils();
            var shpfileName = "";

            if (showInMap)
            {
                if (waypoints.Count > 0)
                {
                    Shapefile sf = null;
                    sf          = ShapefileFactory.PointsFromWayPointList(waypoints, out handles, gps.DeviceName, filename);
                    shpfileName = "Trip waypoints";
                    int h = MapLayersHandler.AddLayer(sf, shpfileName, uniqueLayer: true, layerKey: sf.Key, rejectIfExisting: true);
                }
            }
            return(MapLayersHandler.CurrentMapLayer.Handle);
        }