Skip to main content

Trimble layers

Contents

Add specialized layers to the map, ranging from weather alerts to 3D buildings.

Trimble Layers

activity_sample_trimble_layers.xml

<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <com.trimblemaps.mapsdk.maps.MapView
        android:id="@+id/mapView"
        android:layout_width="0dp"
        android:layout_height="0dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <LinearLayout
        android:id="@+id/linearLayout"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent">

        <Button
            android:onClick="onClickToggleTrimbleLayer"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Traffic" />

        <Button
            android:onClick="onClickToggleTrimbleLayer"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="3D Buildings" />

        <Button
            android:onClick="onClickToggleTrimbleLayer"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="POIs" />
        <Button
            android:onClick="onClickToggleTrimbleLayer"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Weather" />

    </LinearLayout>

</androidx.constraintlayout.widget.ConstraintLayout>

SampleTrimbleLayersActivity.java

Last updated May 1, 2024.
Contents