由于某种原因(导出矩形形状的导入),我有一个使用测地线渲染直线矩形的多边形。矩形用中间点填充,以确保它遵循纬度的圆,因为我的多边形总是测地线。 对于这种特殊情况,谷歌地图中的渲染非常奇怪,好像有一些优化涉及不能很好地处理具有相同纬度的连续点。我附上了一个例子。
以前有人遇到过这个问题吗?
lat,long和degrees中的实际坐标:
40.4108,-15.3394; 40.4108,-14.3507; 40.4108,-13.3591; 40.4108,-12.3647; 40.4108,-11.3679; 40.4108,-10.3689; 40.4108,-9.3680; 40.4108,-8.3653; 40.4108,-7.3612; 40.4108,-6.3559; 40.4108,-5.3497; 40.4108,-4.3428; 40.4108,-3.3355; 40.4108,-2.3280; 40.4108,-1.3207; 40.4108,-0.3138; 40.4108,0.6924; 40.4108,1.6977; 40.4108,2.7018; 40.4108,3.7045; 40.4108,4.7054; 40.4108,5.7044; 40.4108,6.7012; 40.4108,7.6955; 40.4108,8.6872; 40.4108,9.6759; 39.3435,9.6759; 38.2760,9.6759; 37.2082,9.6759; 36.1401,9.6759; 35.0718,9.6759; 34.0032,9.6759; 32.9344,9.6759; 31.8654,9.6759; 30.7961,9.6759; 29.7266,9.6759; 29.7266,8.6823; 29.7266,7.6869; 29.7266,6.6900; 29.7266,5.6916; 29.7266,4.69.2; 29.7266,3.6911; 29.7266,2.6893; 29.7266,1.6866; 29.7266,0.6833; 29.7266,-0.3206; 29.7266,-1.3249; 29.7266,-2.3295; 29.7266,-3.3341; 29.7266,-4.3386; 29.7266,-5.3429; 29.7266,-6.3468; 29.7266,-7.3502; 29.7266,-8.3528; 29.7266,-9.3547; 29.7266,-10.3555; 29.7266,-11.3551; 29.7266,-12.3535; 29.7266,-13.3504; 29.7266,-14.3458; 29.7266,-15.3394; 30.7961,-15.3394; 31.8654,-15.3394; 32.9344,-15.3394; 34.0032,-15.3394; 35.0718,-15.3394; 36.1401,-15.3394; 37.2082,-15.3394; 38.2760,-15.3394; 39.3435,-15.3394; 40.4108,-15.3394;
编辑:检查jsfiddle http://jsfiddle.net/leforthomas/UgddA/ 代码:
var polygon = new google.maps.Polygon({geodesic: true, map: map, path: path});
你可以清楚地说矩形是破碎的,甚至是不连续的。这感觉就像谷歌地图的一个错误,但可能有一些我忽略的东西。
我重复,问题是"以前是否有人遇到过这个问题?"。