@@ -31,31 +31,31 @@ async function initMap() {
3131 pinSvgString ,
3232 'image/svg+xml'
3333 ) . documentElement ;
34- const pinSvgMarkerView = new AdvancedMarkerElement ( {
34+ const pinSvgMarker = new AdvancedMarkerElement ( {
3535 position : { lat : 37.42475 , lng : - 122.094 } ,
36- content : pinSvg ,
3736 title : 'A marker using a custom SVG image.' ,
3837 //@ts -ignore
3938 anchorLeft : '-50%' ,
4039 anchorTop : '-50%' ,
4140 } ) ;
42- mapElement . append ( pinSvgMarkerView ) ;
41+ pinSvgMarker . append ( pinSvg ) ;
42+ mapElement . append ( pinSvgMarker ) ;
4343 // [END maps_advanced_markers_graphics_inline]
4444
4545 // [START maps_advanced_markers_graphics_png]
4646 // A marker with a with a URL pointing to a PNG.
4747 const beachFlagImg = document . createElement ( 'img' ) ;
4848 beachFlagImg . src = new URL ( './public/beachflag.png' , import . meta. url ) . href ;
4949
50- const beachFlagMarkerView = new AdvancedMarkerElement ( {
50+ const beachFlagMarker = new AdvancedMarkerElement ( {
5151 position : { lat : 37.434 , lng : - 122.082 } ,
5252 content : beachFlagImg ,
5353 title : 'A marker using a custom PNG Image' ,
5454 //@ts -ignore
5555 anchorLeft : '0px' ,
5656 anchorTop : '100%' ,
5757 } ) ;
58- mapElement . append ( beachFlagMarkerView ) ;
58+ mapElement . append ( beachFlagMarker ) ;
5959 // [END maps_advanced_markers_graphics_png]
6060
6161 // [START maps_advanced_markers_graphics_svg_glyph]
@@ -67,12 +67,12 @@ async function initMap() {
6767 glyphSrc : glyphImgSrc ,
6868 } ) ;
6969
70- const glyphSvgMarkerView = new AdvancedMarkerElement ( {
70+ const glyphSvgMarker = new AdvancedMarkerElement ( {
7171 position : { lat : 37.425 , lng : - 122.07 } ,
72- content : glyphSvgPinElement . element ,
7372 title : 'A marker using a custom SVG for the glyph.' ,
7473 } ) ;
75- mapElement . append ( glyphSvgMarkerView ) ;
74+ glyphSvgMarker . append ( glyphSvgPinElement ) ;
75+ mapElement . append ( glyphSvgMarker ) ;
7676 // [END maps_advanced_markers_graphics_svg_glyph]
7777
7878 // [START maps_advanced_markers_graphics_place_icon]
@@ -97,12 +97,12 @@ async function initMap() {
9797 glyphSrc : new URL ( String ( place . svgIconMaskURI ) ) ,
9898 } ) ;
9999
100- const placeIconMarkerView = new AdvancedMarkerElement ( {
100+ const placeIconMarker = new AdvancedMarkerElement ( {
101101 position : place . location ,
102- content : pinElement . element ,
103102 title : place . displayName ,
104103 } ) ;
105- mapElement . append ( placeIconMarkerView ) ;
104+ placeIconMarker . append ( pinElement ) ;
105+ mapElement . append ( placeIconMarker ) ;
106106 // [END maps_advanced_markers_graphics_place_icon]
107107}
108108
0 commit comments