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>(); }