MarkerElement class
google.maps.maps3d
. MarkerElement
class
extends HTMLElement
implements MarkerElementOptions
Shows a position on a 3D map. Note that the position
must be set for the MarkerElement
to display.
<gmp-marker altitude-mode=" value-name " anchor-left=" string " anchor-top=" string " collision-behavior=" value-name " collision-priority=" number " position=" lat,lng " title=" string "> </gmp-marker>
const { MarkerElement } = await google . maps . importLibrary ( "maps3d" );
Constructor
MarkerElement([options])
-
options:MarkerElementOptions optional
MarkerElement
with the options specified.Properties
AltitudeMode
optional
AltitudeMode.CLAMP_TO_GROUND
altitude-mode="value-name"
string optional
anchor-left="string"
string optional
anchor-top="string"
CollisionBehavior
optional
CollisionBehavior.REQUIRED
MarkerElement
, Marker3DElement
, or with the basemap labels.collision-behavior="value-name"
number optional
CollisionBehavior.OPTIONAL_AND_HIDES_LOWER_PRIORITY
markers (including Marker3DElement
). A higher collisionPriority
value indicates higher priority.collision-priority="number"
LatLngLiteral
| LatLngAltitude
| LatLngAltitudeLiteral
optional
-
position="lat,lng" -
position="lat,lng,altitude"
string
MarkerElement
with the provided value.title="string"
Slots |
|
|---|---|
default
|
|
CSS Properties |
|
|---|---|
z-index
|
The z-index of this marker. See
z-index
documentation
for more details. Overlapping markers with a larger z-index cover those with a smaller one. By default, markers are displayed according to their DOM position, with markers added later in the DOM appearing in front of markers added to the DOM earlier. |
Methods |
|
|---|---|
Inherited:
addEventListener
, removeEventListener
|
MarkerElementOptions interface
google.maps.maps3d
. MarkerElementOptions
interface
MarkerElementOptions object used to define the properties that can be set on a MarkerElement.
Properties |
|
|---|---|
altitudeMode
optional
|
Type:
AltitudeMode
optional
|
anchorLeft
optional
|
Type:
string optional
|
anchorTop
optional
|
Type:
string optional
|
collisionBehavior
optional
|
Type:
CollisionBehavior
optional
|
collisionPriority
optional
|
Type:
number optional
|
position
optional
|
Type:
LatLngLiteral
| LatLngAltitude
| LatLngAltitudeLiteral
optional
|
title
optional
|
Type:
string optional
|
MarkerInteractiveElement class
google.maps.maps3d
. MarkerInteractiveElement
class
extends MarkerElement
implements MarkerInteractiveElementOptions
Shows a position on a 3D map. Note that the position
must be set for the MarkerInteractiveElement
to display. Unlike MarkerElement
, MarkerInteractiveElement
receives a gmp-click
event.
<gmp-marker-interactive gmp-popover-target-element=" popover-id "> </gmp-marker-interactive>
const { MarkerInteractiveElement } = await google . maps . importLibrary ( "maps3d" );
Constructor
MarkerInteractiveElement([options])
-
options:MarkerInteractiveElementOptions optional
MarkerInteractiveElement
with the options specified. Properties |
|
|---|---|
gmpPopoverTargetElement
|
Type:
PopoverElement
optional
When set, the popover element will be open on this marker's click.
HTML attribute:
gmp-popover-target-element="popover-id"
|
Inherited:
altitudeMode
(attr: altitude-mode
), anchorLeft
(attr: anchor-left
), anchorTop
(attr: anchor-top
), collisionBehavior
(attr: collision-behavior
), collisionPriority
(attr: collision-priority
), position
(attr: position
), title
(attr: title
) |
|
Slots |
|
|---|---|
Inherited:
default
|
CSS Properties |
|
|---|---|
Inherited:
z-index
|
Methods |
|
|---|---|
Inherited:
addEventListener
, removeEventListener
|
Events
function(clickEvent)
-
clickEvent:LocationClickEvent optional
MarkerInteractiveElementOptions interface
google.maps.maps3d
. MarkerInteractiveElementOptions
interface
extends MarkerElementOptions
MarkerInteractiveElementOptions object used to define the properties that can be set on a MarkerInteractiveElement.
Properties |
|
|---|---|
gmpPopoverTargetElement
optional
|
Type:
PopoverElement
optional
|
Inherited:
altitudeMode
, anchorLeft
, anchorTop
, collisionBehavior
, collisionPriority
, position
, title
|
|
Marker3DElement class
google.maps.maps3d
. Marker3DElement
class
extends HTMLElement
implements Marker3DElementOptions
Shows a position on a 3D map. Note that the position
must be set for the Marker3DElement
to display.
<gmp-marker-3d altitude-mode=" value-name " autofits-camera collision-behavior=" value-name " collision-priority=" number " draws-when-occluded extruded label=" string " position=" lat,lng " size-preserved z-index=" number "> </gmp-marker-3d>
const { Marker3DElement } = await google . maps . importLibrary ( "maps3d" );
Constructor
Marker3DElement([options])
-
options:Marker3DElementOptions optional
Marker3DElement
with the options specified.Properties
AltitudeMode
optional
AltitudeMode.CLAMP_TO_GROUND
altitude-mode="value-name"
boolean optional
false
autofits-camera
CollisionBehavior
optional
CollisionBehavior.REQUIRED
collision-behavior="value-name"
number optional
collision-priority="number"
boolean optional
false
draws-when-occluded
boolean optional
false
altitudeMode
must be either RELATIVE_TO_GROUND
or ABSOLUTE
.extruded
string optional
label="string"
LatLngLiteral
| LatLngAltitude
| LatLngAltitudeLiteral
optional
-
position="lat,lng" -
position="lat,lng,altitude"
boolean optional
false
size-preserved
number optional
z-index="number"
Slots |
|
|---|---|
default
|
Any custom elements directly added to the
Marker3DElement
will be slotted, however only elements of HTMLImageElement
, SVGElement
and PinElement
types will be used for drawing markers, other elements will be ignored.HTMLImageElement
and SVGElement
must be wrapped in <template>
element before assigning to the Marker3DElement
's default slot.Images and SVGs are currently rasterized before they are rendered in the 3D scene, so custom HTML embedded into SVG or CSS classes added to images won't be applied and might not be reflected when markers are displayed on the screen. |
Methods |
|
|---|---|
Inherited:
addEventListener
, removeEventListener
|
Marker3DElementOptions interface
google.maps.maps3d
. Marker3DElementOptions
interface
Marker3DElementOptions object used to define the properties that can be set on a Marker3DElement.
Properties |
|
|---|---|
altitudeMode
optional
|
Type:
AltitudeMode
optional
|
collisionBehavior
optional
|
Type:
CollisionBehavior
optional
|
collisionPriority
optional
|
Type:
number optional
|
drawsWhenOccluded
optional
|
Type:
boolean optional
|
extruded
optional
|
Type:
boolean optional
|
label
optional
|
Type:
string optional
|
position
optional
|
Type:
LatLngLiteral
| LatLngAltitude
| LatLngAltitudeLiteral
optional
|
sizePreserved
optional
|
Type:
boolean optional
|
zIndex
optional
|
Type:
number optional
|
Marker3DInteractiveElement class
google.maps.maps3d
. Marker3DInteractiveElement
class
extends Marker3DElement
implements Marker3DInteractiveElementOptions
Shows a position on a 3D map. Note that the position
must be set for the Marker3DInteractiveElement
to display. Unlike Marker3DElement
, Marker3DInteractiveElement
receives a gmp-click
event.
<gmp-marker-3d-interactive gmp-popover-target-element=" popover-id " title=" string "> </gmp-marker-3d-interactive>
const { Marker3DInteractiveElement } = await google . maps . importLibrary ( "maps3d" );
Constructor
Marker3DInteractiveElement([options])
-
options:Marker3DInteractiveElementOptions optional
Marker3DInteractiveElement
with the options specified. Properties |
|
|---|---|
gmpPopoverTargetElement
|
Type:
PopoverElement
optional
When set, the popover element will be open on this marker's click.
HTML attribute:
gmp-popover-target-element="popover-id"
|
title
|
Type:
string
Rollover text. If provided, an accessibility text (e.g. for use with screen readers) will be added to the
Marker3DInteractiveElement
with the provided value. HTML attribute:
title="string"
|
Inherited:
altitudeMode
(attr: altitude-mode
),
(attr: autofits-camera
), collisionBehavior
(attr: collision-behavior
), collisionPriority
(attr: collision-priority
), drawsWhenOccluded
(attr: draws-when-occluded
), extruded
(attr: extruded
), label
(attr: label
), position
(attr: position
), sizePreserved
(attr: size-preserved
), zIndex
(attr: z-index
) |
|
Slots |
|
|---|---|
default
|
Any custom elements directly added to the
Marker3DInteractiveElement
will be slotted, however only elements of PinElement
's type will be used for drawing markers, other elements will be ignored. |
Methods |
|
|---|---|
Inherited:
addEventListener
, removeEventListener
|
Events
function(clickEvent)
-
clickEvent:LocationClickEvent optional
Marker3DInteractiveElementOptions interface
google.maps.maps3d
. Marker3DInteractiveElementOptions
interface
extends Marker3DElementOptions
Marker3DInteractiveElementOptions object used to define the properties that can be set on a Marker3DInteractiveElement.
Properties |
|
|---|---|
gmpPopoverTargetElement
optional
|
Type:
PopoverElement
optional
|
title
optional
|
Type:
string optional
|
Inherited:
altitudeMode
, collisionBehavior
, collisionPriority
, drawsWhenOccluded
, extruded
, label
, position
, sizePreserved
, zIndex
|
|
Model3DElement class
google.maps.maps3d
. Model3DElement
class
extends HTMLElement
implements Model3DElementOptions
A 3D model which allows the rendering of gLTF models. Note that the position
and the src
must be set for the Model3DElement
to display.
Core properties of the gLTF PBR
should be supported. No extensions or extension properties are currently supported.
<gmp-model-3d altitude-mode=" value-name " orientation=" heading,tilt,roll " position=" lat,lng " scale=" number " src=" url "> </gmp-model-3d>
const { Model3DElement } = await google . maps . importLibrary ( "maps3d" );
Constructor
Model3DElement([options])
-
options:Model3DElementOptions optional
Model3DElement
with the options specified.Properties
AltitudeMode
optional
AltitudeMode.CLAMP_TO_GROUND
altitude-mode="value-name"
Orientation3D
| Orientation3DLiteral
optional
Rotations are applied to the model in the following order: roll, tilt and then heading.
orientation="heading,tilt,roll"
LatLngLiteral
| LatLngAltitude
| LatLngAltitudeLiteral
optional
Model3DElement
's position. Altitude is ignored in certain modes and thus optional.-
position="lat,lng" -
position="lat,lng,altitude"
number| Vector3D
| Vector3DLiteral
optional
1
-
scale="number" -
scale="x,y,z"
string| URL
optional
.glb
format are supported.Any relative HTTP urls will be resolved to their corresponding absolute ones.
Please note that If you're hosting your
.glb
model files on a different website or server than your main application, make sure to set up the correct CORS HTTP headers. This allows your application to securely access the model files from the other domain.src="url"
Methods |
|
|---|---|
Inherited:
addEventListener
, removeEventListener
|
Model3DElementOptions interface
google.maps.maps3d
. Model3DElementOptions
interface
Model3DElementOptions object used to define the properties that can be set on a Model3DElement.
Properties |
|
|---|---|
altitudeMode
optional
|
Type:
AltitudeMode
optional
|
orientation
optional
|
Type:
Orientation3D
| Orientation3DLiteral
optional
|
position
optional
|
Type:
LatLngLiteral
| LatLngAltitude
| LatLngAltitudeLiteral
optional
|
scale
optional
|
Type:
number| Vector3D
| Vector3DLiteral
optional
|
src
optional
|
Type:
string| URL
optional
|
Model3DInteractiveElement class
google.maps.maps3d
. Model3DInteractiveElement
class
extends Model3DElement
implements Model3DInteractiveElementOptions
A 3D model which allows the rendering of gLTF models. Note that the position
and the src
must be set for the Model3DElement
to display.
Core properties of the gLTF PBR
should be supported. No extensions or extension properties are currently supported.
Unlike Model3DElement
, Model3DInteractiveElement
receives a gmp-click
event.
<gmp-model-3d-interactive></gmp-model-3d-interactive>
const { Model3DInteractiveElement } = await google . maps . importLibrary ( "maps3d" );
Constructor
Model3DInteractiveElement([options])
-
options:Model3DElementOptions optional
Model3DInteractiveElement
with the options specified. Properties |
|
|---|---|
Inherited:
altitudeMode
(attr: altitude-mode
), orientation
(attr: orientation
), position
(attr: position
), scale
(attr: scale
), src
(attr: src
) |
Methods |
|
|---|---|
Inherited:
addEventListener
, removeEventListener
|
Events
function(clickEvent)
-
clickEvent:LocationClickEvent optional
Model3DInteractiveElementOptions interface
google.maps.maps3d
. Model3DInteractiveElementOptions
interface
extends Model3DElementOptions
Model3DInteractiveElementOptions object used to define the properties that can be set on a Model3DInteractiveElement.
Properties |
|
|---|---|
Inherited:
altitudeMode
, orientation
, position
, scale
, src
|
Polyline3DElement class
google.maps.maps3d
. Polyline3DElement
class
extends HTMLElement
implements Polyline3DElementOptions
A 3D polyline is a linear overlay of connected line segments on a 3D map.
<gmp-polyline-3d altitude-mode=" value-name " autofits-camera draws-occluded-segments extruded geodesic outer-color=" string " outer-width=" number " path=" lat1,lng1,altitude1 lat2,lng2,altitude2 lat3,lng3,altitude3 ... " stroke-color=" string " stroke-width=" number " z-index=" number "> </gmp-polyline-3d>
const { Polyline3DElement } = await google . maps . importLibrary ( "maps3d" );
Constructor
Polyline3DElement([options])
-
options:Polyline3DElementOptions optional
Polyline3DElement
with the options specified. Properties |
|
|---|---|
altitudeMode
|
Type:
AltitudeMode
optional
Default:
AltitudeMode.CLAMP_TO_GROUND
Specifies how altitude components in the coordinates are interpreted.
HTML attribute:
altitude-mode="value-name"
|
|
Type:
boolean optional
Default:
false
If provided, the specified polyline will be made visible within the map viewport, alongside any other elements that have opted in.
HTML attribute:
autofits-camera
|
drawsOccludedSegments
|
Type:
boolean optional
Default:
false
Specifies whether parts of the polyline which could be occluded are drawn or not. Polylines can be occluded by map geometry (e.g. buildings).
HTML attribute:
draws-occluded-segments
|
extruded
|
Type:
boolean optional
Default:
false
Specifies whether to connect the polyline to the ground. To extrude a polyline, the
altitudeMode
must be either RELATIVE_TO_GROUND
or ABSOLUTE
. HTML attribute:
extruded
|
geodesic
|
Type:
boolean optional
Default:
false
When
true
, edges of the polyline are interpreted as geodesic and will follow the curvature of the Earth. When false
, edges of the polyline are rendered as straight lines in screen space. HTML attribute:
geodesic
|
outerColor
|
Type:
string optional
The outer color. All CSS3 colors are supported.
HTML attribute:
outer-color="string"
|
outerWidth
|
Type:
number optional
The outer width is between
0.0
and 1.0
. This is a percentage of the strokeWidth
. HTML attribute:
outer-width="number"
|
path
|
Type:
Iterable
< LatLngAltitude
| LatLngAltitudeLiteral
| LatLngLiteral
> optional
The ordered sequence of coordinates of the Polyline. Altitude is ignored in certain modes and thus optional.
HTML attribute:
path="lat1,lng1,altitude1 lat2,lng2,altitude2 lat3,lng3,altitude3 ..."
|
strokeColor
|
Type:
string optional
The stroke color. All CSS3 colors are supported.
HTML attribute:
stroke-color="string"
|
strokeWidth
|
Type:
number optional
The stroke width in pixels.
HTML attribute:
stroke-width="number"
|
zIndex
|
Type:
number optional
The zIndex compared to other polys.
HTML attribute:
z-index="number"
|
|
Type:
Iterable
< LatLngAltitude
| LatLngAltitudeLiteral
| LatLngLiteral
> optional
The ordered sequence of coordinates of the Polyline. Altitude is ignored in certain modes and thus optional.
|
Methods |
|
|---|---|
Inherited:
addEventListener
, removeEventListener
|
Polyline3DElementOptions interface
google.maps.maps3d
. Polyline3DElementOptions
interface
Polyline3DElementOptions object used to define the properties that can be set on a Polyline3DElement.
Properties |
|
|---|---|
altitudeMode
optional
|
Type:
AltitudeMode
optional
|
coordinates
optional
|
Type:
Iterable
< LatLngAltitude
| LatLngAltitudeLiteral
| LatLngLiteral
> optional
|
drawsOccludedSegments
optional
|
Type:
boolean optional
|
extruded
optional
|
Type:
boolean optional
|
geodesic
optional
|
Type:
boolean optional
|
outerColor
optional
|
Type:
string optional
|
outerWidth
optional
|
Type:
number optional
|
strokeColor
optional
|
Type:
string optional
|
strokeWidth
optional
|
Type:
number optional
|
zIndex
optional
|
Type:
number optional
|
Polyline3DInteractiveElement class
google.maps.maps3d
. Polyline3DInteractiveElement
class
extends Polyline3DElement
implements Polyline3DInteractiveElementOptions
A 3D polyline is a linear overlay of connected line segments on a 3D map. Unlike Polyline3DElement
, Polyline3DInteractiveElement
receives a gmp-click
event.
<gmp-polyline-3d-interactive></gmp-polyline-3d-interactive>
const { Polyline3DInteractiveElement } = await google . maps . importLibrary ( "maps3d" );
Constructor
Polyline3DInteractiveElement([options])
-
options:Polyline3DElementOptions optional
Polyline3DInteractiveElement
with the options specified. Properties |
|
|---|---|
Inherited:
altitudeMode
(attr: altitude-mode
),
(attr: autofits-camera
), drawsOccludedSegments
(attr: draws-occluded-segments
), extruded
(attr: extruded
), geodesic
(attr: geodesic
), outerColor
(attr: outer-color
), outerWidth
(attr: outer-width
), path
(attr: path
), strokeColor
(attr: stroke-color
), strokeWidth
(attr: stroke-width
), zIndex
(attr: z-index
),
|
Methods |
|
|---|---|
Inherited:
addEventListener
, removeEventListener
|
Events
function(clickEvent)
-
clickEvent:LocationClickEvent optionalThe event object will contain the lat-lng-altitude location of the click.
Polyline3DInteractiveElementOptions interface
google.maps.maps3d
. Polyline3DInteractiveElementOptions
interface
extends Polyline3DElementOptions
Polyline3DInteractiveElementOptions object used to define the properties that can be set on a Polyline3DInteractiveElement.
Properties |
|
|---|---|
Inherited:
altitudeMode
, coordinates
, drawsOccludedSegments
, extruded
, geodesic
, outerColor
, outerWidth
, strokeColor
, strokeWidth
, zIndex
|
Polygon3DElement class
google.maps.maps3d
. Polygon3DElement
class
extends HTMLElement
implements Polygon3DElementOptions
A 3D polygon (like a 3D polyline) defines a series of connected coordinates in an ordered sequence. Additionally, polygons form a closed loop and define a filled region.
<gmp-polygon-3d draws-occluded-segments extruded fill-color=" string " geodesic path=" lat1,lng1,altitude1 lat2,lng2,altitude2 lat3,lng3,altitude3 ... " stroke-color=" string " stroke-width=" number " z-index=" number "> </gmp-polygon-3d>
const { Polygon3DElement } = await google . maps . importLibrary ( "maps3d" );
Constructor
Polygon3DElement([options])
-
options:Polygon3DElementOptions optional
Polygon3DElement
with the options specified. Properties |
|
|---|---|
altitudeMode
|
Type:
AltitudeMode
optional
Default:
AltitudeMode.CLAMP_TO_GROUND
Specifies how altitude components in the coordinates are interpreted.
|
drawsOccludedSegments
|
Type:
boolean optional
Default:
false
Specifies whether parts of the polygon which could be occluded are drawn or not. Polygons can be occluded by map geometry (e.g. buildings).
HTML attribute:
draws-occluded-segments
|
extruded
|
Type:
boolean optional
Default:
false
Specifies whether to connect the polygon to the ground. To extrude a polygon, the
altitudeMode
must be either RELATIVE_TO_GROUND
or ABSOLUTE
. HTML attribute:
extruded
|
fillColor
|
Type:
string optional
The fill color. All CSS3 colors are supported.
HTML attribute:
fill-color="string"
|
geodesic
|
Type:
boolean optional
Default:
false
When
true
, edges of the polygon are interpreted as geodesic and will follow the curvature of the Earth. When false
, edges of the polygon are rendered as straight lines in screen space. HTML attribute:
geodesic
|
innerPaths
|
Type:
Iterable
< Iterable
< LatLngAltitude
| LatLngAltitudeLiteral
| LatLngLiteral
>> optional
The ordered sequence of coordinates that designates a closed loop. Unlike polylines, a polygon may consist of one or more paths, which create multiple cut-outs inside the polygon.
|
path
|
Type:
Iterable
< LatLngAltitude
| LatLngAltitudeLiteral
| LatLngLiteral
> optional
The ordered sequence of coordinates that designates a closed loop. Altitude is ignored in certain modes and thus optional.
HTML attribute:
path="lat1,lng1,altitude1 lat2,lng2,altitude2 lat3,lng3,altitude3 ..."
|
strokeColor
|
Type:
string optional
The stroke color. All CSS3 colors are supported.
HTML attribute:
stroke-color="string"
|
strokeWidth
|
Type:
number optional
The stroke width in pixels.
HTML attribute:
stroke-width="number"
|
zIndex
|
Type:
number optional
The zIndex compared to other polys.
HTML attribute:
z-index="number"
|
|
Type:
Iterable
< LatLngAltitude
| LatLngAltitudeLiteral
| LatLngLiteral
> optional
The ordered sequence of coordinates that designates a closed loop. Altitude is ignored in certain modes and thus optional.
|
|
Type:
Iterable
< Iterable
< LatLngAltitude
| LatLngAltitudeLiteral
| LatLngLiteral
>> optional
The ordered sequence of coordinates that designates a closed loop. Unlike polylines, a polygon may consist of one or more paths, which create multiple cut-outs inside the polygon.
|
Methods |
|
|---|---|
Inherited:
addEventListener
, removeEventListener
|
Polygon3DElementOptions interface
google.maps.maps3d
. Polygon3DElementOptions
interface
Polygon3DElementOptions object used to define the properties that can be set on a Polygon3DElement.
Properties |
|
|---|---|
altitudeMode
optional
|
Type:
AltitudeMode
optional
|
drawsOccludedSegments
optional
|
Type:
boolean optional
|
extruded
optional
|
Type:
boolean optional
|
fillColor
optional
|
Type:
string optional
|
geodesic
optional
|
Type:
boolean optional
|
innerCoordinates
optional
|
Type:
Iterable
< Iterable
< LatLngAltitude
| LatLngAltitudeLiteral
>| Iterable
< LatLngLiteral
>> optional
|
outerCoordinates
optional
|
Type:
Iterable
< LatLngAltitude
| LatLngAltitudeLiteral
| LatLngLiteral
> optional
|
strokeColor
optional
|
Type:
string optional
|
strokeWidth
optional
|
Type:
number optional
|
zIndex
optional
|
Type:
number optional
|
Polygon3DInteractiveElement class
google.maps.maps3d
. Polygon3DInteractiveElement
class
extends Polygon3DElement
implements Polygon3DInteractiveElementOptions
A 3D polygon (like a 3D polyline) defines a series of connected coordinates in an ordered sequence. Additionally, polygons form a closed loop and define a filled region. Unlike Polygon3DElement
, Polygon3DInteractiveElement
receives a gmp-click
event.
<gmp-polygon-3d-interactive></gmp-polygon-3d-interactive>
const { Polygon3DInteractiveElement } = await google . maps . importLibrary ( "maps3d" );
Constructor
Polygon3DInteractiveElement([options])
-
options:Polygon3DElementOptions optional
Polygon3DInteractiveElement
with the options specified. Properties |
|
|---|---|
Inherited:
altitudeMode
, drawsOccludedSegments
(attr: draws-occluded-segments
), extruded
(attr: extruded
), fillColor
(attr: fill-color
), geodesic
(attr: geodesic
), innerPaths
, path
(attr: path
), strokeColor
(attr: stroke-color
), strokeWidth
(attr: stroke-width
), zIndex
(attr: z-index
),
,
|
Methods |
|
|---|---|
Inherited:
addEventListener
, removeEventListener
|
Events
function(clickEvent)
-
clickEvent:LocationClickEvent optionalThe event object will contain the lat-lng-altitude location of the click.
Polygon3DInteractiveElementOptions interface
google.maps.maps3d
. Polygon3DInteractiveElementOptions
interface
extends Polygon3DElementOptions
Polygon3DInteractiveElementOptions object used to define the properties that can be set on a Polygon3DInteractiveElement.
Properties |
|
|---|---|
Inherited:
altitudeMode
, drawsOccludedSegments
, extruded
, fillColor
, geodesic
, innerCoordinates
, outerCoordinates
, strokeColor
, strokeWidth
, zIndex
|
FlattenerElement class
google.maps.maps3d
. FlattenerElement
class
extends HTMLElement
implements FlattenerElementOptions
A flattener element is used to flatten a specified area on the map.
<gmp-flattener path=" lat1,lng1,altitude1 lat2,lng2,altitude2 lat3,lng3,altitude3 ... "> </gmp-flattener>
const { FlattenerElement } = await google . maps . importLibrary ( "maps3d" );
Constructor
FlattenerElement([options])
-
options:FlattenerElementOptions optional
Properties |
|
|---|---|
innerPaths
|
Type:
Iterable
< Iterable
< LatLngAltitude
| LatLngAltitudeLiteral
| LatLngLiteral
>> optional
The ordered sequence of coordinates that designates a closed loop. These paths define Exclusion Holes within the polygon's main path, which is the Flattening Zone. Areas within an innerPath are exempt from flattening.
|
path
|
Type:
Iterable
< LatLngAltitude
| LatLngAltitudeLiteral
| LatLngLiteral
> optional
The ordered sequence of coordinates that designates a closed loop. This loop defines the Flattening Zone.
HTML attribute:
path="lat1,lng1,altitude1 lat2,lng2,altitude2 lat3,lng3,altitude3 ..."
|
Methods |
|
|---|---|
Inherited:
addEventListener
, removeEventListener
|
FlattenerElementOptions interface
google.maps.maps3d
. FlattenerElementOptions
interface
FlattenerElementOptions object used to define the properties that can be set on a FlattenerElement.
Properties |
|
|---|---|
innerPaths
optional
|
Type:
Iterable
< Iterable
< LatLngAltitude
| LatLngAltitudeLiteral
>| Iterable
< LatLngLiteral
>> optional
|
path
optional
|
Type:
Iterable
< LatLngAltitude
| LatLngAltitudeLiteral
| LatLngLiteral
> optional
|
PopoverElement class
google.maps.maps3d
. PopoverElement
class
extends HTMLElement
implements PopoverElementOptions
A custom HTML element that renders a popover. It looks like a bubble and is often connected to a marker.
<gmp-popover auto-pan-disabled light-dismiss-disabled open position-anchor=" lat,lng "> </gmp-popover>
const { PopoverElement } = await google . maps . importLibrary ( "maps3d" );
Constructor
PopoverElement([options])
-
options:PopoverElementOptions optional
Properties
AltitudeMode
optional
AltitudeMode.CLAMP_TO_GROUND
boolean optional
false
auto-pan-disabled
boolean optional
false
popover="auto"
attribute which is part of the browser Popover API
.light-dismiss-disabled
boolean optional
false
open
LatLngLiteral
| LatLngAltitudeLiteral
| Marker3DInteractiveElement
| MarkerInteractiveElement
|string optional
-
position-anchor="lat,lng" -
position-anchor="lat,lng,altitude" -
position-anchor="marker-id"
Slots |
|
|---|---|
default
|
Places the slotted content in the main section of the popover.
|
header
|
Places the slotted content in the heading section of the popover.
|
CSS Properties |
|
|---|---|
--gmp-popover-max-width
|
Maximum width of the popover, regardless of content's width.
|
--gmp-popover-min-width
|
Minimum width of the popover, regardless of content's width. When using this property, it is strongly recommended to set it to a value less than the width of the map (in pixels).
|
--gmp-popover-pixel-offset-x
|
The offset on the x-axis, in pixels, of the tip of the popover from the point on the map at whose geographical coordinates the popover is anchored.
|
--gmp-popover-pixel-offset-y
|
The offset on the y-axis, in pixels, of the tip of the popover from the point on the map at whose geographical coordinates the popover is anchored.
|
background-color
|
The background color of the popover. See
background-color
documentation
for more details. Please note that default place popover is also affected by this property. Use targeted CSS classes or inline styles on custom popovers to avoid styling the default place popover. |
border-radius
|
The border-radius of the popover. See
border-radius
documentation
for more details. Please note that default place popover is also affected by this property. Use targeted CSS classes or inline styles on custom popovers to avoid styling the default place popover. |
box-shadow
|
The box-shadow of the popover. See
box-shadow
documentation
for more details. Please note that default place popover is also affected by this property. Use targeted CSS classes or inline styles on custom popovers to avoid styling the default place popover. |
color-scheme
|
Indicates which color scheme this popover can be rendered in. See
color-scheme
documentation
for more details. If not specified, it defaults to the user's color scheme preferences. |
padding
|
The padding of the popover. See
padding
documentation
for more details. Please note that default place popover is also affected by this property. Use targeted CSS classes or inline styles on custom popovers to avoid styling the default place popover. |
Methods |
|
|---|---|
Inherited:
addEventListener
, removeEventListener
|
PopoverElementOptions interface
google.maps.maps3d
. PopoverElementOptions
interface
PopoverElementOptions object used to define the properties that can be set on a PopoverElement.
Properties |
|
|---|---|
altitudeMode
optional
|
Type:
AltitudeMode
optional
|
autoPanDisabled
optional
|
Type:
boolean optional
|
lightDismissDisabled
optional
|
Type:
boolean optional
|
open
optional
|
Type:
boolean optional
|
positionAnchor
optional
|
Type:
LatLngLiteral
| LatLngAltitudeLiteral
|string| Marker3DInteractiveElement
| MarkerInteractiveElement
optional
|
AltitudeMode constants
google.maps.maps3d
. AltitudeMode
constants
Specifies how altitude components in the coordinates are interpreted.
These constants are also usable as strings. In TypeScript, the string literals are defined by the AltitudeModeString
type.
const { AltitudeMode } = await google . maps . importLibrary ( "maps3d" );
Constants |
|
|---|---|
ABSOLUTE
|
Allows to express objects relative to the average mean sea level. That also means that if the terrain level of detail changes underneath the object, its absolute position will remain the same. |
CLAMP_TO_GROUND
|
Allows to express objects placed on the ground. They will remain at ground level following the terrain regardless of what altitude is provided. If the object is positioned over a major body of water, it will be placed at sea level. |
RELATIVE_TO_GROUND
|
Allows to express objects relative to the ground surface. If the terrain level of detail changes, the position of the object will remain constant relative to the ground. When over water, the altitude will be interpreted as a value in meters above sea level. |
RELATIVE_TO_MESH
|
Allows to express objects relative to the highest of ground+building+water surface. When over water, this will be water surface; when over terrain, this will be the building surface (if present) or ground surface (if no buildings). |
CirclePathElement class
google.maps.maps3d
. CirclePathElement
class
extends HTMLElement
implements CirclePathElementOptions
A 3D circle overlay on a 3D map.
<gmp-circle-path center=" lat,lng,altitude " radius=" number "> </gmp-circle-path>
const { CirclePathElement } = await google . maps . importLibrary ( "maps3d" );
Constructor
CirclePathElement([options])
-
options:CirclePathElementOptions optional
CirclePathElement
with the options specified. Properties |
|
|---|---|
center
|
Type:
LatLngAltitude
| LatLngAltitudeLiteral
| LatLngLiteral
optional
The center of the circle.
HTML attribute:
center="lat,lng,altitude"
|
radius
|
Type:
number optional
The radius of the circle in meters.
HTML attribute:
radius="number"
|
Methods |
|
|---|---|
Inherited:
addEventListener
, removeEventListener
|
CirclePathElementOptions interface
google.maps.maps3d
. CirclePathElementOptions
interface
CirclePathElementOptions object used to define the properties that can be set on a CirclePathElement.
Properties |
|
|---|---|
center
optional
|
Type:
LatLngAltitude
| LatLngAltitudeLiteral
| LatLngLiteral
optional
|
radius
optional
|
Type:
number optional
|

