Quantcast
Channel: DotSpatial
Viewing all articles
Browse latest Browse all 3973

New Post: Add graphic elements to map

$
0
0
We are able to add graphics but it is not stored in the map and when refresh map it will gone. Does any guide us what is the actual procedure to store graphic elements in map.

Graphics graphics =map1.CreateGraphics();
Icon icon = new Icon(@"D:\test\Pin8.ico"); Coordinate coords = new Coordinate(LinkData.SourceX, LinkData.SourceY);
System.Drawing.Point pt = map1.ProjToPixel(coords);
graphics.DrawIcon(icon, pt.X, pt.Y);

Viewing all articles
Browse latest Browse all 3973

Trending Articles