示例#1
0
 /// <summary>
 /// Method to render the arrow
 /// </summary>
 /// <param name="map">The map</param>
 /// <param name="graphics">The graphics object</param>
 /// <param name="arrow">The arrow</param>
 private void RenderArrow(SharpMap.Map map, System.Drawing.Graphics graphics, GeoAPI.Geometries.ILineString arrow)
 {
     var pts = new System.Drawing.PointF[arrow.Coordinates.Length];
     for (var i = 0; i < pts.Length; i++)
         pts[i] = map.WorldToImage(arrow.GetCoordinateN(i));
     graphics.DrawLines(ArrowPen, pts);
 }
示例#2
0
        public ImageMapPoint(SharpMap.Geometries.Geometry geom, SharpMap.Map map, ImageMapStyle mapStyle)
            : base(geom, map)
        {
            this.Radius = mapStyle.Point.Radius;

            SharpMap.Geometries.Point P = geom as SharpMap.Geometries.Point;
            PointF pf = map.WorldToImage(P);
            map.MapTransform.TransformPoints(new PointF[] { pf });
            center = new System.Drawing.Point((int)pf.X, (int)pf.Y);

        }