/// <summary> /// Transforms given WGS84 coordinates to a point, relative to the map. /// </summary> /// <param name="p">Point to transform</param> /// <returns>WGS84 coordinates</returns> public Point ToMap(Point p) { var e = Map.GetEnvelope("EPSG:76131"); p = p.Wgs84ToPtvMercator(); return(new Point(Map.ActualWidth * (p.X - e.West) / (e.East - e.West), Map.ActualHeight * (p.Y - e.North) / (e.South - e.North))); }