@@ -22,6 +22,7 @@ async function init() {
2222
2323 map . mode = 'SATELLITE' ;
2424
25+ // [START maps_3d_marker_customization_pin_border]
2526 // Change the border color.
2627 const pinBorder = new PinElement ( {
2728 borderColor : '#FFFFFF' ,
@@ -30,13 +31,15 @@ async function init() {
3031 position : { lat : 37.415 , lng : - 122.035 } ,
3132 } ) ;
3233 markerWithBorder . append ( pinBorder ) ;
34+ // [END maps_3d_marker_customization_pin_border]
3335
3436 // Add a label.
3537 const markerWithLabel = new Marker3DElement ( {
3638 position : { lat : 37.419 , lng : - 122.03 } ,
3739 label : 'Simple label' ,
3840 } ) ;
3941
42+ // [START maps_3d_marker_customization_scale]
4043 // Adjust the scale.
4144 const pinScaled = new PinElement ( {
4245 scale : 1.5 ,
@@ -45,7 +48,9 @@ async function init() {
4548 position : { lat : 37.419 , lng : - 122.02 } ,
4649 } ) ;
4750 markerWithScale . append ( pinScaled ) ;
51+ // [END maps_3d_marker_customization_scale]
4852
53+ // [START maps_3d_marker_customization_glyph_color]
4954 // Change the glyph color.
5055 const pinGlyph = new PinElement ( {
5156 glyphColor : 'white' ,
@@ -54,7 +59,9 @@ async function init() {
5459 position : { lat : 37.415 , lng : - 122.025 } ,
5560 } ) ;
5661 markerWithGlyphColor . append ( pinGlyph ) ;
62+ // [END maps_3d_marker_customization_glyph_color]
5763
64+ // [START maps_3d_marker_customization_glyph_text]
5865 // Change many elements together and extrude marker.
5966 const pinTextGlyph = new PinElement ( {
6067 background : '#F0F6FC' ,
@@ -68,6 +75,16 @@ async function init() {
6875 altitudeMode : 'RELATIVE_TO_GROUND' ,
6976 } ) ;
7077 markerWithGlyphText . append ( pinTextGlyph ) ;
78+ // [END maps_3d_marker_customization_glyph_text]
79+
80+ // [START maps_3d_marker_customization_extruded]
81+ // Change a marker's altitude and add an extrusion.
82+ const extrudedMarker = new Marker3DElement ( {
83+ position : { lat : 37.4239163 , lng : - 122.0947209 , altitude : 100 } ,
84+ altitudeMode : 'RELATIVE_TO_GROUND' ,
85+ extruded : true ,
86+ } ) ;
87+ // [END maps_3d_marker_customization_extruded]
7188
7289 // Hide the glyph.
7390 const pinNoGlyph = new PinElement ( {
@@ -77,7 +94,7 @@ async function init() {
7794 position : { lat : 37.415 , lng : - 122.005 } ,
7895 } ) ;
7996 markerWithNoGlyph . append ( pinNoGlyph ) ;
80-
97+ // [START maps_3d_marker_customization_background]
8198 // Change the background color.
8299 const pinBackground = new PinElement ( {
83100 background : '#FBBC04' ,
@@ -87,6 +104,7 @@ async function init() {
87104 position : { lat : 37.419 , lng : - 122.01 } ,
88105 } ) ;
89106 markerWithBackground . append ( pinBackground ) ;
107+ // [END maps_3d_marker_customization_background]
90108
91109 map . append ( markerWithLabel ) ;
92110 map . append ( markerWithScale ) ;
@@ -95,6 +113,7 @@ async function init() {
95113 map . append ( markerWithGlyphColor ) ;
96114 map . append ( markerWithGlyphText ) ;
97115 map . append ( markerWithNoGlyph ) ;
116+ map . append ( extrudedMarker ) ;
98117
99118 document . body . append ( map ) ;
100119}
0 commit comments