//Austen: changed input params to pass entire layer list so that we'd have access to all it's values public void CreatePoint(ILayer FP_point, int layer, LayerList layerList, string id, double lat, double lon, DateTime time, bool isStale, int displayChoice) { if (isStale == false) iconLoc += "red turn.ico"; else iconLoc += "white turn.ico"; try { FP_point.DeleteAllObjects(layer);// delete everything on this layer.. keeps us from having bread crumbs FP_point.AddIcon(layer, iconLoc, lat, lon, ""); if (layerList.FP_LatLonlist.Count > 1) { double lat1 = layerList.FP_LatLonlist[layerList.FP_LatLonlist.Count - 1].lat; double lon1 = layerList.FP_LatLonlist[layerList.FP_LatLonlist.Count - 1].lon; DateTime time1 = layerList.FP_LatLonlist[layerList.FP_LatLonlist.Count - 1].time; double heading = logistics.Heading(lat, lon, lat1, lon1); // Compute heading double speed = logistics.SpeedMPH(lat, lon, lat1, lon1, time, time1); // Compute Speed RenderArrow(FP_point, layerList, lat, lon, time, heading); //{MPH = 0, Bearing = 1, None = 2, Both = 3}; if (displayChoice == 0) // if we want to see just mph { AddUIDText(FP_point, layerList, lat, lon, heading, id, YtextOffset - 15); AddSpeedText(FP_point, layerList, lat, lon, speed, heading, YtextOffset); } if (displayChoice == 1) // if we want to see just bearing { AddUIDText(FP_point, layerList, lat, lon, heading, id, YtextOffset - 15); AddHeadingText(FP_point, layerList, lat, lon, heading, YtextOffset); } if (displayChoice == 2) // if we want to see just id { AddUIDText(FP_point, layerList, lat, lon, heading, id, YtextOffset); } if (displayChoice == 3) // if we want to see just all { AddUIDText(FP_point, layerList, lat, lon, heading, id, YtextOffset - 30); AddSpeedText(FP_point, layerList, lat, lon, speed, heading, YtextOffset - 15); AddHeadingText(FP_point, layerList, lat, lon, heading, YtextOffset); } } FP_point.Refresh(-1); } catch (Exception ex) { string error = ex.Message; MessageBox.Show("Error Message: "+ex.Message+ " Stack Trace: "+ex.StackTrace); } }
//Austen: changed input params to pass entire layer list so that we'd have access to all it's values public void CreatePoint(ILayer FP_point, int layer, LayerList layerList, string id, double lat, double lon, DateTime time, bool isStale) { if (isStale == false) iconLoc += "red turn.ico"; else iconLoc += "white turn.ico"; try { FP_point.DeleteAllObjects(layer);// delete everything on this layer.. keeps us from having bread crumbs FP_point.AddIcon(layer, iconLoc, lat, lon, ""); if (layerList.FP_LatLonlist.Count > 1) { double lat1 = layerList.FP_LatLonlist[layerList.FP_LatLonlist.Count - 1].lat; double lon1 = layerList.FP_LatLonlist[layerList.FP_LatLonlist.Count - 1].lon; DateTime time1 = layerList.FP_LatLonlist[layerList.FP_LatLonlist.Count - 1].time; double heading = logistics.Heading(lat, lon, lat1, lon1); //Compute heading double speed = logistics.SpeedMPH(lat, lon, lat1, lon1, time, time1); //Compute Speed RenderArrow(FP_point, layerList, lat, lon, time, heading); AddUIDText(FP_point, layerList, lat, lon, heading, id); AddHeadingText(FP_point, layerList, lat, lon, heading); AddSpeedText(FP_point, layerList, lat, lon, speed, heading); } FP_point.Refresh(-1); } catch (Exception ex) { string error = ex.Message; MessageBox.Show("Error Message: "+ex.Message+ " Stack Trace: "+ex.StackTrace); } }
//Austen: changed input params to pass entire layer list so that we'd have access to all it's values public void CreatePoint(ILayer FP_point, int layer, LayerList layerList, string id, double lat, double lon, DateTime time, bool isStale) { iconLoc = FalconPoint4.Properties.Settings.Default.DefaultIconFolder + WhichIcon(id); if (isStale == true) // data is stale - { id += " - STALE"; FP_point.SetPen(layer, 0, 0, 0, 0, 0, 0, 1, 3, 0); } else // data is not stale FP_point.SetPen(layer, 50, 205, 50, 0, 0, 0, 0, 3, 0); try { FP_point.DeleteAllObjects(layer);// delete everything on this layer.. keeps us from having bread crumbs FP_point.AddIcon(layer, iconLoc, lat, lon, ""); if (layerList.FP_LatLonlist.Count > 1) { double lat1 = layerList.FP_LatLonlist[layerList.FP_LatLonlist.Count - 1].lat; double lon1 = layerList.FP_LatLonlist[layerList.FP_LatLonlist.Count - 1].lon; DateTime time1 = layerList.FP_LatLonlist[layerList.FP_LatLonlist.Count - 1].time; double heading = logistics.Heading(lat, lon, lat1, lon1); // Compute heading double speed = logistics.SpeedMPH(lat, lon, lat1, lon1, time, time1); // Compute Speed if (layerList.showArrow != false) { RenderArrow(FP_point, layerList, lat, lon, time, heading); //{MPH = 0, Bearing = 1, None = 2, Both = 3}; if (FPmain.DisplayChoice == 0) // if we want to see just mph { AddUIDText(FP_point, layerList, lat, lon, heading, id, YtextOffset - 15); AddSpeedText(FP_point, layerList, lat, lon, speed, heading, YtextOffset); } if (FPmain.DisplayChoice == 1) // if we want to see just bearing { AddUIDText(FP_point, layerList, lat, lon, heading, id, YtextOffset - 15); AddHeadingText(FP_point, layerList, lat, lon, heading, YtextOffset); } if (FPmain.DisplayChoice == 2) // if we want to see just id { AddUIDText(FP_point, layerList, lat, lon, heading, id, YtextOffset); } if (FPmain.DisplayChoice == 3) // if we want to see just all { AddUIDText(FP_point, layerList, lat, lon, heading, id, YtextOffset - 30); AddSpeedText(FP_point, layerList, lat, lon, speed, heading, YtextOffset - 15); AddHeadingText(FP_point, layerList, lat, lon, heading, YtextOffset); } } } FP_point.Refresh(-1); } catch (Exception ex) { string error = ex.Message; MessageBox.Show("Error Message: "+ex.Message+ " Stack Trace: "+ex.StackTrace); } }