public static PointOfInterest createPointOfInterest(Location loc, List<Address> addresses) { Address ca = findNearestAddress(loc, addresses); //more options exist, for doing this PointOfInterest p = new PointOfInterest(loc, ca, ca, ca); p.TurnDirection = "POI"; p.Locs[2].StreetName = "description of POI"; return p; }
public static int addPOIToTurnList(PointOfInterest poi, List<Turn> turns) { int index = 0; while (index < turns.Count && poi.Locs[1].GpxLocation.Distance > turns[index].Locs[1].GpxLocation.Distance) index++; turns.Insert(index, (Turn)poi); return index; }
public void drawPointsOfInterest(ref Image map, PointOfInterest[] pois) { //draw the points of interest on the map Graphics g = Graphics.FromImage(map); Font f = new Font(FontFamily.GenericSansSerif, 9, FontStyle.Bold); SolidBrush sb1 = new SolidBrush(Color.Turquoise); SolidBrush sb2 = new SolidBrush(Color.Black); Point ptB; for (int i = 0; i < pois.Length; i++) { ptB = _fd.getPoint(pois[i].LocationFromMouse); g.FillEllipse(sb1, ptB.X - 5, ptB.Y - 5, 10, 10); g.DrawString(pois[i].Name + "\r\n" + pois[i].Notes, f, sb2, ptB); } }