WPF版 GMAP Route.shape 用line改变不了样式,改用path即可

历史的尘埃 / 2025-02-21 / 原文

1 GMapRoute route = new GMapRoute(pointLatLngs)
2 {
3     Tag="route",
4     Shape=new Path() { Stroke= Brushes.DarkRed, StrokeDashArray= new DoubleCollection() { 2, 1 }, StrokeThickness=4 }//line无效,改用path
5 };
6 
7 
8 this.mapControl.Markers.Add(route);//wpf版没有overlays 直接向markers添加