在基于focla点的坐标系上绘制一条椭圆线?

问题描述:

我正在尝试在Google地图上画一条虚线,所以我不能使用eshape.js.我需要创建一个在坐标系中近似椭圆的点数组.它只是用于显示,因此不必那么精确.

I'm trying to draw a dashed line on a google map, so I can't use eshape.js. I need to create an array of points that approximate an elipse in a coordinate system. It's just for display so it doesn't have to be that precise.

如果有人可以解释一下数学就很好了.如果您在javascript中应用它,会获得额外的信用;)

If someone can just explain the math that's fine. Extra credit if you apply it in javascript ;)

现在,您可以在Google Maps API中执行此操作.最近,Google在折线"中添加了符号",使您可以使用SVG设置线条样式: https://developers.google.com/maps/documentation/javascript/overlays#Symbols

This is now something you can do within the Google Maps API. Recently, Google added Symbols to Polylines, allowing you to use SVG to style your lines: https://developers.google.com/maps/documentation/javascript/overlays#Symbols