Skip to content

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

Merged
dkhawk merged 12 commits into
mainfrom
feature/new_features_with_0.2.2_sdk
Aug 28, 2026
Merged

feat(samples): add 0.2.2 showcase features (Camera Animation, Path Following, Data Viz, Roadmap Mode, FOV)#50
dkhawk merged 12 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
dkhawk and others added 3 commits August 28, 2026 09:34
…engine, and modern UI controls (#58)

* refactor(path-following): clean MVVM architecture, custom 3D gesture engine, and modern UI controls

* test(path-following): add unit test suites for PathEngine and PathFollowingViewModel

* refactor(path-following): clean PathPlaybackState data class and remove unused strings
…tracking & 3-way framework parity (#59)

* feat(camera): implement declarative keyframe tour with reverse-trig stationary tracking

- Implement StationaryCameraTracker math controller with ENU inverse spherical trigonometry for fixed-vantage camera tracking
- Add 5-step keyframe queue tour (high-altitude swoop, dwell pause, 360 orbit, stationary vantage tracking flight, and native flyTo transition to Coit Tower)
- Modernize UI controls with Material 3 dropdown menu button and structured HTML help dialog across Kotlin Views, Java Views, and Jetpack Compose
- Ensure consistent glTF model coordinate alignment, midpoint jump teleportation, and post-flight destination persistence
- Add comprehensive unit test coverage with Google Truth assertions across domain controllers

* fix(camera): synchronize UI state across frameworks and add framework subtitles

- Add framework indicator subtitles (Kotlin Views, Java Views, Jetpack Compose) to control panel headers and top toolbars
- Fix LiveData approach button label and sub-options observation in Java Views Activity
- Correct chase camera heading for High-Rate Frame Dispatcher to follow flight path bearing (106.2°)
- Add delayed onMap3DViewReady initialization workaround to ensure reliable initial camera and entity setup

* docs(camera): document onMap3DViewReady initialization delay workaround

* docs(camera): clean KDoc math formatting for Android Studio and Dokka compatibility

---------

Co-authored-by: Dale Hawkins <107309+dkhawk@users.noreply.github.com>
Comment thread Maps3DSamples/ApiDemos/common/build.gradle.kts Fixed
Comment thread Maps3DSamples/ApiDemos/common/build.gradle.kts Fixed
Comment thread Maps3DSamples/ApiDemos/common/build.gradle.kts Fixed
style="@style/TextAppearance.Material3.LabelLarge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Step 1 of 4: High-Altitude Swoop In"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:text="Swooping down from 1200m overview into close flight alignment (250m) behind the airplane."
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:textColor="?android:attr/textColorTertiary"
android:text="Native asynchronous SDK flight transition directly to Coit Tower."

controlsCard = customView.findViewById(CommonR.id.control_panel)
customView.findViewById<TextView>(CommonR.id.tv_framework_subtitle)?.apply {
text = "Kotlin Views"
Comment on lines +260 to +264
controlsCard.setOnTouchListener { _, event ->
resetAutoFadeTimer()
sheetGestureDetector.onTouchEvent(event)
false
}
Comment on lines +260 to +264
controlsCard.setOnTouchListener { _, event ->
resetAutoFadeTimer()
sheetGestureDetector.onTouchEvent(event)
false
}
Comment on lines +237 to +243
cardHeader?.setOnTouchListener { v, event ->
if (cardSwipeDetector.onTouchEvent(event)) {
true
} else {
v.onTouchEvent(event)
}
}
Comment on lines +245 to +247
controlsCard?.setOnTouchListener { _, event ->
cardSwipeDetector.onTouchEvent(event)
}
viewModel.currentState.speedBoostMultiplier >= 1.5 -> " (2x Boost)"
else -> ""
}
speedSliderLabel.text = getString(R.string.follow_speed_format, value.toInt()) + boostSuffix
state.speedBoostMultiplier >= 1.5 -> " (2x Boost)"
else -> ""
}
speedSliderLabel.text = getString(R.string.follow_speed_format, state.followSpeedMps.toInt()) + boostSuffix
@dkhawk
dkhawk merged commit b87b16c into main Aug 28, 2026
10 checks passed
@dkhawk
dkhawk deleted the feature/new_features_with_0.2.2_sdk branch August 28, 2026 23:05
googlemaps-bot pushed a commit that referenced this pull request Aug 28, 2026
# [1.10.0](v1.9.0...v1.10.0) (2026-08-28)

### Features

* **samples:** add 0.2.2 showcase features (Camera Animation, Path Following, Data Viz, Roadmap Mode, FOV) ([#50](#50)) ([b87b16c](b87b16c)), closes [#54](#54) [#55](#55) [#58](#58) [#59](#59)
@googlemaps-bot

Copy link
Copy Markdown

🎉 This PR is included in version 1.10.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants