A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developers.google.com/maps/documentation/maps-3d/android-sdk/add-a-marker below:

Add a marker to a map | Maps 3D SDK for Android

Add a marker to a map

Stay organized with collections Save and categorize content based on your preferences.

This product or feature is Experimental (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 Maps Platform Service Specific Terms. For more information, see the launch stage descriptions.

The following code sample demonstrates how to add a basic marker to a 3D map by caling the addMarker method. To use this code sample, follow the instructions in Setup and Add a 3D map to your app to set up your Android Studio project with a basic 3D map. Then, add the following code to the MainActivity.kt file:

// Add imports
import com.google.android.gms.maps3d.model.latLngAltitude

...

// Add to the onMap3DViewReady method, after the googleMap3D object has been initialized
googleMap3D.setMapMode(Map3DMode.SATELLITE)

googleMap3D.setCamera(
    camera {
        center = latLngAltitude {
            latitude = 52.51974795
            longitude = 13.40715553
            altitude = 150.0
        }
        heading = 252.7
        tilt = 79.0
        range = 1500.0
    }
)

// Add a marker using absolute altitude positioning
googleMap3D.addMarker(markerOptions {
    position = latLngAltitude {
        latitude = 52.519605780912585
        longitude = 13.406867190588198
        altitude = 150.0
    }
    label = "Absolute (150m)"
    altitudeMode = AltitudeMode.ABSOLUTE
    isExtruded = true
    isDrawnWhenOccluded = true
    collisionBehavior = CollisionBehavior.REQUIRED_AND_HIDES_OPTIONAL
})
Note: For more information on working with markers, see:

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

Last updated 2025-08-18 UTC.

[[["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-18 UTC."],[],[]]


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4