Stay organized with collections
Save and categorize content based on your preferences.
Use markers to draw a user's attention to a location on a map. This guide
demonstrates how to use and customize markers in 3D maps. You can control the
shape, size, and color of markers, in addition to the altitude at which they
appear.
Use markers to show locations on maps. The example above shows a basic, single
marker with no customization applied.
Customize color, scale and icon image
Customize the default marker's background, glyph, border color, and size.
Replace the default marker icon with a custom SVG resource.
Set marker altitude
You can set marker altitude by extruding the marker and setting the altitude.
Make markers respond to click and keyboard events
Make a marker respond to clicks and keyboard events by adding a click event
listener.
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 map
label.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-20 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\nUse markers to draw a user's attention to a location on a map. This guide\ndemonstrates how to use and customize markers in 3D maps. You can control the\nshape, size, and color of markers, in addition to the altitude at which they\nappear.\n\nUse markers to show locations on maps. The example above shows a basic, single\nmarker with no customization applied.\n\nCustomize color, scale and icon image\n\nCustomize the default marker's background, glyph, border color, and size.\n\nReplace the default marker icon with a custom SVG resource.\n\nSet marker altitude\n\nYou can set marker altitude by extruding the marker and setting the altitude.\n\nMake markers respond to click and keyboard events\n\nMake a marker respond to clicks and keyboard events by adding a `click` event\nlistener. \n\n function initMap() {\n const map = new Map3DElement({\n center: { lat: 37.4690, lng: -122.1074, altitude: 0 },\n tilt: 67.5,\n range: 45000,\n mode: MapMode.HYBRID\n });\n\n const interactiveMarker = new google.maps.marker.Marker3DInteractiveElement({\n map,\n position: {lat: 37.4239163, lng: -122.0947209},\n });\n\n interactiveMarker.addEventListener('gmp-click', (event) =\u003e {\n // Handle the click event.\n // ...\n });\n }\n\nSet marker collision behavior\n\nSpecify how a marker should behave when it collides with another marker or map\nlabel. \n\n const marker = new Marker3DElement({\n position: {lat, lng},\n collisionBehavior: google.maps.CollisionBehavior.REQUIRED\n });\n\nNext step\n\n- [Add a marker](/maps/documentation/javascript/3d/marker-add)"]]