Rysuj na mapie
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Możesz dodawać do mapy obiekty, aby oznaczać punkty, linie, obszary lub kolekcje obiektów. Interfejs Maps JavaScript API nazywa te obiekty nakładkami. Nakładki są powiązane ze współrzędnymi geograficznymi, więc poruszają się, gdy przeciągasz mapę lub ją powiększasz.
Typy nakładania
Interfejs Maps JavaScript API obsługuje kilka różnych typów nakładek, które możesz dodawać programowo:
- Pop-up to specjalny rodzaj nakładki służący do wyświetlania treści (zazwyczaj tekstu lub obrazów) w określonym miejscu na mapie. Popupy są analogiczne do okien informacyjnych w Maps JavaScript API.
- Linie na mapie są wyświetlane za pomocą wielokątów, które są reprezentowane jako uporządkowana sekwencja punktów połączonych liniami.
- Obszary o dowolnym kształcie na mapie są wyświetlane za pomocą wielokątów.
Podobnie jak linie łamane, wielokąty to uporządkowana sekwencja lokalizacji. W przeciwieństwie do polilinii wielokąty definiują region, który otaczają.
- Modele to zasoby gLTF renderowane na mapie jako kształty 3D.
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-04-29 UTC.
[null,null,["Ostatnia aktualizacja: 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."]]