public void BeginFigure(double latitude, double longitude, double?z, double?m) { double x = 0; double y = 0; SphericalMercator.FromLonLat(longitude, latitude, out x, out y); _builder.BeginFigure(x, y, z, m); }
private PointF GetPixel(PointF ll) { Point meters = SphericalMercator.FromLonLat(ll); float x = (meters.X - this.topLeft.X) / this.metersToPixel; float y = (meters.Y - this.topLeft.Y) / this.metersToPixel; y = this.size.Height - y; return(new PointF(x, y)); }
public PointF GetPixel(PointF ll) { var meters = SphericalMercator.FromLonLat(ll); var x = (meters.X - _topLeft.X) / _metersToPixel; var y = (meters.Y - _topLeft.Y) / _metersToPixel; y = _size.Height - y; return(new PointF(x, y)); }
public Utf8Grid(int utfGridResolution, int tileX, int tileY, int zoom) { Size size = new Size(256 / utfGridResolution, 256 / utfGridResolution); this.bitmap = new Bitmap(size.Width, size.Height, PixelFormat.Format32bppRgb); this.graphics = Graphics.FromImage(this.bitmap); RectangleF bbox = this.GetBoundingBoxInLatLngWithMargin(tileX, tileY, zoom); this.graphicsPathBuilder = new GraphicsPathBuilder(SphericalMercator.FromLonLat(bbox), size); this.results = new Utf8GridResults(); }
public Utf8Grid(int utfGridResolution, int tileX, int tileY, int zoom) { _utfGridResolution = utfGridResolution; var size = new Size(256 / utfGridResolution, 256 / utfGridResolution); _bitmap = new Bitmap(size.Width, size.Height, PixelFormat.Format32bppRgb); _graphics = Graphics.FromImage(_bitmap); var bbox = GetBoundingBoxInLatLngWithMargin(tileX, tileY, zoom); _graphicsPathBuilder = new GraphicsPathBuilder(SphericalMercator.FromLonLat(bbox), new Size(256 / _utfGridResolution, 256 / _utfGridResolution)); this.Keys = new List <string>(); this.Data = new Dictionary <string, object>(); this.Grid = new List <string>(); }