Places UI Kit: A ready-to-use library that provides room for customization and low-code development. Try it out, and share yourinput on your UI Kit experience.

Markers

Use markers to draw a user's attention to a location on a map. This guidedemonstrates how to use and customize markers in 3D maps. You can control theshape, size, and color of markers, in addition to the altitude at which theyappear.

Use markers to show locations on maps. The example above shows a basic, singlemarker with no customization applied.

Customize color, scale and icon image

Customize the default marker's background, glyph, border color, and size.

Custom markers

Replace the default marker icon with a custom SVG resource.

Markers with graphics

Set marker altitude

You can set marker altitude by extruding the marker and setting the altitude.

Extruded marker

Make markers respond to click and keyboard events

Make a marker respond to clicks and keyboard events by adding aclick eventlistener.

functioninitMap(){constmap=newMap3DElement({center:{lat:37.4690,lng:-122.1074,altitude:0},tilt:67.5,range:45000,mode:MapMode.HYBRID});constinteractiveMarker=newgoogle.maps.marker.Marker3DInteractiveElement({map,position:{lat:37.4239163,lng:-122.0947209},});interactiveMarker.addEventListener('gmp-click',(event)=>{// Handle the click event.// ...});}

Set marker collision behavior

Specify how a marker should behave when it collides with another marker or maplabel.

constmarker=newMarker3DElement({position:{lat,lng},collisionBehavior:google.maps.CollisionBehavior.REQUIRED});

Next step

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-11-21 UTC.