Skip to content

feat(samples): add 0.2.2 showcase features (Camera Animation, Path Following, Data Viz, Roadmap Mode, FOV) - #50

Open
LoyalAbbas wants to merge 6 commits into
mainfrom
feature/new_features_with_0.2.2_sdk
Open

feat(samples): add 0.2.2 showcase features (Camera Animation, Path Following, Data Viz, Roadmap Mode, FOV)#50
LoyalAbbas wants to merge 6 commits into
mainfrom
feature/new_features_with_0.2.2_sdk

Conversation

@LoyalAbbas

@LoyalAbbas LoyalAbbas commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

This PR introduces 5 new major showcase demonstration features for the Google Maps 3D SDK (0.2.2 release) across Java Views, Kotlin Views, and Jetpack Compose (ApiDemos and ComposeDemos), alongside automated visual tests, performance optimizations, and stability polish.


Features Included in This PR

  1. Advanced Camera Animation (AdvancedCameraAnimationActivity)
    • 3D airplane model tour over San Francisco with smooth multi-step keyframe flights and landmark orbits.
    • VSYNC-synchronized hardware frame loop for stutter-free interpolation.
  2. Path Following (PathFollowingActivity)
    • Ground-level camera perspectives following 3D path polylines across Urban (NYC) and Rural (Big Sur) routes.
    • Dynamic parameter controls with touch-responsive UI fade animations.
  3. Data Visualization (DataVisualizationActivity)
    • Coastal inundation flood-fill simulation using extruded 3D polygons (extruded = true).
  4. Roadmap Mode (RoadmapModeActivity)
    • Interactive toggling between ROADMAP, HYBRID, and SATELLITE modes with dynamic camera orientation.
  5. Field of View (FOV) (FieldOfViewActivity)
    • Optical angle distortion slider demonstrating perspective transitions from 15° Telephoto to 120° Ultra-Wide.

Tooling & Code Health

  • Spotless Formatting: Formatted with ./gradlew spotlessApply across all modified files to strictly adhere to standard 4-space ktlint rules and remove all formatting diff noise.
  • Verification: Verified via ./gradlew test assembleDebug and ./gradlew spotlessCheck with 100% passing results across all modules.

… Field of View, Path Following, and Advanced Camera Animation

@github-advanced-security github-advanced-security AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Android Lint found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

<activity android:name=".placedetails.PlaceDetailsActivity" android:exported="true" android:label="Place Details" android:theme="@style/Theme.AppCompat.DayNight.NoActionBar" />
<activity android:name=".advancedcameraanimation.AdvancedCameraAnimationActivity" android:exported="true" android:label="Advanced Camera Animation" />
<activity android:name=".datavisualization.DataVisualizationActivity" android:exported="true" android:label="Data Visualization" />
<activity android:name=".cloudstyling.CloudStylingActivity" android:exported="true" android:label="Cloud Map Styling" />

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has been removed, but CloudStylingActivity is still an activity on the code. Regression?

import com.google.maps.android.compose3d.PolylineConfig
import kotlinx.coroutines.delay

class PathFollowingActivity : ComponentActivity() {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem to use SampleBaseActivity.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I did this intentionally. The reason is that PathFollowingActivity needs its own specific UI controllers for the demonstration. If I were to extend SampleBaseActivity here, it would unnecessarily result in two different layouts trying to initialize the map instance.

However, if you look at the other features like DataVisualizationActivity, RoadmapModeActivity, etc., I did utilize the SampleBaseActivity layout by dynamically adding their respective controllers inside the activity_common_map layout.

Soon I will change for PathFollowingActivity also

@kikoso

kikoso commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

There are a bunch of changes introducing only reformatting changes (like in ComposeDemos/MainActivity.kt).

What if we agree to use the formatting rules from Android Studio, to avoid introducing those changes? Or if we want to formalise it, we could agree on using spotless, which can run on CI/CD.

…atting

- Add showcase demos for Advanced Camera Animation, Path Following, Data Visualization, Roadmap Mode, and Field of View
- Synchronize hardware frame loops to VSYNC and improve touch-fade UX
- Format codebase using spotless to adhere to 4-space ktlint rules
@dkhawk dkhawk changed the title New sample demos for Cloud Styling, Roadmap Mode, Data Visualization,… feat(samples): add 0.2.2 showcase features (Camera Animation, Path Following, Data Viz, Roadmap Mode, FOV) Aug 19, 2026
… auto-fade, and literate docs (#54)

* Enhance Advanced Camera Animation and Path Following samples

- Advanced Camera Animation:
  - Add modular step animation pipeline (FlyToStep, OrbitStep, DwellStep, FlyAroundStep, KeyframeStep).
  - Add high-altitude San Francisco starting camera view.
  - Implement full reset and continuous orbit support.
  - Sync Java, Kotlin, and Jetpack Compose implementations.

- Path Following:
  - Implement two-polyline progress tracking with wide blue base route (lower z-index) and narrow purple progress route (higher z-index).
  - Use in-place fixed polyline IDs to eliminate rendering flickering.
  - Default altitude mode to 'Clamp to Ground' with support for Relative to Ground, Relative to Mesh, and Absolute.
  - Add dynamic path height slider to avoid z-fighting with terrain.
  - Add collapsible control panel with explicit collapse/expand button, auto-slide dismissal, and subtle idle opacity.
  - Extract all hardcoded strings into strings.xml resources.
  - Align Java and Kotlin implementations.

* feat(fieldofview,datavisualization): polish FOV and Data Visualization with collapsible cards and literate docs

* feat(roadmapmode): polish Roadmap Mode with collapsible header and literate docs

* feat(routes): polish Routes API sample with collapsible control panel, auto-fade, and literate docs

* docs(samples): augment literate comments explaining 3D coordinates, extrusion, and smoothing

* build: untrack and gitignore gradle-daemon-jvm.properties

* docs: update copyright headers to 2026 for camera animation step classes

* fix(samples): address PR review feedback on animation timing, tour resume, onPause, and TransitionManager collapse
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/fov_telephoto"
android:textSize="10sp"
android:layout_marginStart="2dp"
android:layout_marginEnd="2dp"
android:text="@string/fov_standard"
android:textSize="10sp"
android:layout_weight="1"
android:layout_marginEnd="2dp"
android:text="@string/fov_wide"
android:textSize="10sp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/fov_ultrawide"
android:textSize="10sp"
android:paddingBottom="12dp"
>

<RadioGroup
when {
currentFloodHeightMeters <= 2.0 -> {
floodRiskBadge.setText(R.string.flood_risk_baseline)
floodRiskBadge.setTextColor(Color.parseColor("#008800"))
currentFloodHeightMeters <= 2.0 -> {
floodRiskBadge.setText(R.string.flood_risk_baseline)
floodRiskBadge.setTextColor(Color.parseColor("#008800"))
floodRiskBadge.setBackgroundColor(Color.parseColor("#2000AA00"))

currentFloodHeightMeters <= 8.0 -> {
floodRiskBadge.setText(R.string.flood_risk_minor)
floodRiskBadge.setTextColor(Color.parseColor("#BB7700"))
currentFloodHeightMeters <= 8.0 -> {
floodRiskBadge.setText(R.string.flood_risk_minor)
floodRiskBadge.setTextColor(Color.parseColor("#BB7700"))
floodRiskBadge.setBackgroundColor(Color.parseColor("#20FFAA00"))

currentFloodHeightMeters <= 20.0 -> {
floodRiskBadge.setText(R.string.flood_risk_moderate)
floodRiskBadge.setTextColor(Color.parseColor("#0077CC"))
else -> {
floodRiskBadge.setText(R.string.flood_risk_extreme)
floodRiskBadge.setTextColor(Color.parseColor("#CC0000"))
floodRiskBadge.setBackgroundColor(Color.parseColor("#25FF0000"))
val staticOptions = PolylineOptions().apply {
id = STATIC_ROUTE_POLYLINE_ID
path = staticVertices
strokeColor = Color.parseColor("#4285F4") // Wide blue route
val staticOptions = PolylineOptions().apply {
id = STATIC_ROUTE_POLYLINE_ID
path = staticVertices
strokeColor = Color.parseColor("#4285F4") // Wide blue route
val progressOptions = PolylineOptions().apply {
id = PROGRESS_POLYLINE_ID
path = progressCoordinates
strokeColor = Color.parseColor("#9C27B0") // Narrow purple progress
val progressOptions = PolylineOptions().apply {
id = PROGRESS_POLYLINE_ID
path = progressCoordinates
strokeColor = Color.parseColor("#9C27B0") // Narrow purple progress
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants