/// <summary> /// Returns a Point in pixel-coordinates from a Node with /// geological coordinates. The Point is in coordinates for the /// entire map so it should be converted to coordinates for the /// specific tile that is drawn. /// </summary> private Point nodeToTilePoint(BBox box, Bitmap tile, Node node) { Coordinate c = new Coordinate(node.Longitude, node.Latitude); Projection p = new Projection(box.Width, tile.Width, new Coordinate(box.XMin, box.YMax)); return(p.CoordToPoint(c)); }
private int LonToX(double lon) { Projection p = new Projection(bounds.Width, this.Width, new Coordinate(bounds.XMin, bounds.YMax)); Point point = p.CoordToPoint(new Coordinate(lon, 0)); return(point.X); //return (int)(this.Width * (lon - bounds.XMin) / bounds.Width); }
private Point CoordToPoint(double lon, double lat) { Projection p = new Projection(bounds.Width, this.Width, new Coordinate(bounds.XMin, bounds.YMax)); return(p.CoordToPoint(new Coordinate(lon, lat))); }
private int LonToX(double lon) { Projection p = new Projection(bounds.Width, this.Width, new Coordinate(bounds.XMin, bounds.YMax)); Point point = p.CoordToPoint(new Coordinate(lon, 0)); return point.X; //return (int)(this.Width * (lon - bounds.XMin) / bounds.Width); }
private Point CoordToPoint(double lon, double lat) { Projection p = new Projection(bounds.Width, this.Width, new Coordinate(bounds.XMin, bounds.YMax)); return p.CoordToPoint(new Coordinate(lon, lat)); }
/// <summary> /// Returns a Point in pixel-coordinates from a Node with /// geological coordinates. The Point is in coordinates for the /// entire map so it should be converted to coordinates for the /// specific tile that is drawn. /// </summary> private Point nodeToTilePoint(BBox box, Bitmap tile, Node node) { Coordinate c = new Coordinate(node.Longitude, node.Latitude); Projection p = new Projection(box.Width, tile.Width, new Coordinate(box.XMin, box.YMax)); return p.CoordToPoint(c); }