简体   繁体   中英

How can I draw a bezier curve polyline on a bing map wpf c#?

Bing maps library for wpf seems not to include any helper to draw a bezier curve. It has MapPolyLine which can be used to draw straight lines between n points. Any solution?

Thanks

Bing Maps does not support curved geometries directly, so instead can approximate the shape of a curved line by creating a polyline containing several small segments.

Hope this article will help https://alastaira.wordpress.com/2011/06/27/geodesics-on-bing-maps-v7/

Alternatively to using geodesic, if you don't care about being spatially accurate you can take your coordinates, convert them to pixel coordinates at zoom level 19 using the code here: https://msdn.microsoft.com/en-us/library/bb259689.aspx

Then pass the pixel coordinates through a standard Bezier curve algorithm. Take the resulting values and convert them back to locations.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM