C# Gmap GMapRoute虚线连接两点

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_27278957/article/details/88789532

简述

GMapRoute在Gmap中指路线,默认情况是实线连接,但是如果我们想要使用虚线连接两点,只需将 DashStyle属性设为Dash即可。

List<PointLatLng> latlngs = new List<PointLatLng>();
latlngs.Add(p1);
latlngs.Add(p2);
route.Stroke = new Pen(Color.Red, 2);
route.Stroke.DashStyle = System.Drawing.Drawing2D.DashStyle.Dash;   //虚线
Layer.Routes.Add(route);

猜你喜欢

转载自blog.csdn.net/qq_27278957/article/details/88789532