Beispiel #1
0
        private void MapBox1_MouseMove(Coordinate worldPos, MouseEventArgs imagePos)
        {
            string   tooltip   = string.Empty;
            Envelope infoPoint = new Envelope(worldPos.CoordinateValue);

            infoPoint.ExpandBy(mapBox1.Map.PixelSize * 30);
            foreach (Layer layer in mapBox1.Map.Layers)
            {
                if (layer is TearDropLayer tdl)
                {
                    FeatureDataSet ds = new FeatureDataSet();
                    if (!tdl.DataSource.IsOpen)
                    {
                        tdl.DataSource.Open();
                    }
                    tdl.DataSource.ExecuteIntersectionQuery(infoPoint, ds);
                    tdl.DataSource.Close();
                    foreach (FeatureDataRow row in ds.Tables[0].Rows)
                    {
                        MapLocation line   = (MapLocation)row["MapLocation"];
                        string      colour = (string)row["Colour"];
                        if (colour == TearDropLayer.GREY)
                        {
                            tooltip += line.ToString() + "\n";
                        }
                    }
                }
            }
            if (!tooltip.Equals(mapTooltip.GetToolTip(mapBox1)))
            {
                mapTooltip.SetToolTip(mapBox1, tooltip);
            }
        }
Beispiel #2
0
 public string GetString()
 {
     return(mapType.ToString() + " " + mapLocation.ToString() + " " + mapTheme.ToString() + " " + mapWeather.ToString());
 }
Beispiel #3
0
 public override string ToString()
 {
     return(MapLocation.ToString() + " a:" + AdjacencyList.Count + " c:" + TileCode.ToString());
 }