地図上での図形描画
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
地図にオブジェクトを追加して、ポイント、ライン、領域、またはオブジェクトの集合を指定することができますが、Maps JavaScript API の Photorealistic 3D Maps ではこれらのオブジェクトをオーバーレイと呼びます。オーバーレイは地理座標に紐付いているため、地図をドラッグしたりズームしたりすると連動して動きます。
オーバーレイのタイプ
Maps JavaScript API の Photorealistic 3D Maps では、さまざまなタイプのオーバーレイをプログラマティックに追加できます。
- ポップオーバーは、地図上の特定の場所にあるコンテンツ(通常はテキストまたは画像)を表示する独特のオーバーレイです。ポップオーバーは、Maps JavaScript API の情報ウィンドウに似ています。
- 地図上のラインはポリラインを使用して表示されます。ポリラインは、線分で結ばれた一連の点として表されます。
- 地図上の任意の図形の領域は、ポリゴンを使用して表示されます。ポリラインと同様に、ポリゴンは順序の付いた一連の位置です。ポリラインとは異なり、ポリゴンはそれにより囲まれた領域を定義します。
- モデルは、地図上で 3D シェイプとしてレンダリングされる glTF リソースです。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-04-29 UTC。
[null,null,["最終更新日 2025-04-29 UTC。"],[],[],null,["\u003cbr /\u003e\n\n| This product or feature is in Preview (pre-GA). Pre-GA products and features might have limited support, and changes to pre-GA products and features might not be compatible with other pre-GA versions. Pre-GA Offerings are covered by the [Google\n| Maps Platform Service Specific Terms](https://cloud.google.com/maps-platform/terms/maps-service-terms). For more information, see the [launch stage\n| descriptions](/maps/launch-stages).\n\n\u003cbr /\u003e\n\nYou can add objects to the map to designate points, lines, areas, or collections\nof objects. The Photorealistic 3D Maps in Maps JavaScript API calls these objects overlays. Overlays are\ntied to geographic coordinates, so they move when you drag or zoom the\nmap.\n\nOverlay types\n\nThe Photorealistic 3D Maps in Maps JavaScript API supports several different types of overlays that you\ncan add programmatically:\n\n- A **[popover](/maps/documentation/javascript/3d/popovers)** is a special kind of overlay for displaying content (usually text or images) at a given location on a map. Popovers are analogous to [Info windows](/maps/documentation/javascript/infowindows) in the Maps JavaScript API.\n- Lines on the map are displayed using **[polylines](/maps/documentation/javascript/3d/shapes-lines#polylines)**, represented as an ordered sequence of points connected by line segments.\n- Areas of arbitrary shape on the map are displayed using **[polygons](/maps/documentation/javascript/3d/shapes-lines#polygons)**. Like polylines, polygons are an ordered sequence of locations. Unlike polylines, polygons define a region which they enclose.\n- **[Models](/maps/documentation/javascript/3d/models)** are gLTF resources that are rendered on the map as 3D shapes."]]