Exemplo n.º 1
0
        /// <summary>
        /// Render the map as a <see cref="System.Drawing.Image"/> of the specified size.
        /// </summary>
        /// <param name="map">Map tag to be rendered.</param>
        /// <param name="width">Width of the map in px.</param>
        /// <param name="renderer">PDF renderer to use for rendering the tag.</param>
        public static Image ToImage(this MapTag map, int width)
        {
            Map exported = map.ToSharpMap();

            exported.Size = new Size(width, width);
            return(exported.GetMap());
        }
Exemplo n.º 2
0
 /// <summary>
 /// Render the map as a <see cref="System.Drawing.Image"/>.
 /// </summary>
 /// <param name="map">Map tag to be rendered.</param>
 /// <param name="renderer">PDF renderer to use for rendering the tag.</param>
 public static Image ToImage(this MapTag map)
 {
     return(map.ToSharpMap().GetMap());
 }