【问题标题】:How do I make a polygon in Google Maps that covers the world?如何在 Google 地图中制作覆盖世界的多边形?
【发布时间】:2012-07-27 22:09:16
【问题描述】:

我想制作一个覆盖整个世界的多边形,并有第二条路径,以便从中切出一个形状。我很难弄清楚要使用的正确纬度/经度值,并且填充了“内部多边形”,而不是被打孔。有任何想法吗?我正在使用 Google Maps 3 javascript API。

谢谢!

【问题讨论】:

    标签: javascript google-maps google-maps-api-3


    【解决方案1】:

    这里是a kml file that covers the world except Virginia

    <MultiGeometry>
    <Polygon>
    <outerBoundaryIs> <!-- covers the whole world -->
    <LinearRing>
    <coordinates>
    180,85 90,85 0,85 -90,85 -180,85 -180,0 -180,-85 -90,-85 0,-85 90,-85 180,-85 180,0 180,85
    </coordinates>
    </LinearRing>
    </outerBoundaryIs>
    <innerBoundaryIs>  <!-- hole -->
    <LinearRing>
    <coordinates>-75.914,36.576,0.0 ...
    

    要不填充“内部多边形”,它的路径必须与外部路径的方向相反。我有一个在 kml 上工作的 winding calculator 和一个 helps reverse the winding of polygons from kml 的页面(对用户不太友好)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-06-20
      • 2017-11-13
      • 2019-04-11
      • 1970-01-01
      • 2017-08-29
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多