feat(samples): add 0.2.2 showcase features (Camera Animation, Path Following, Data Viz, Roadmap Mode, FOV) - #50
Conversation
… Field of View, Path Following, and Advanced Camera Animation
There was a problem hiding this comment.
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" /> |
There was a problem hiding this comment.
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() { |
There was a problem hiding this comment.
This doesn't seem to use SampleBaseActivity.
There was a problem hiding this comment.
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
|
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
… 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
…ayout hierarchy, and KTX color parsing (#55)
…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>
| 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" |
| controlsCard.setOnTouchListener { _, event -> | ||
| resetAutoFadeTimer() | ||
| sheetGestureDetector.onTouchEvent(event) | ||
| false | ||
| } |
| controlsCard.setOnTouchListener { _, event -> | ||
| resetAutoFadeTimer() | ||
| sheetGestureDetector.onTouchEvent(event) | ||
| false | ||
| } |
| cardHeader?.setOnTouchListener { v, event -> | ||
| if (cardSwipeDetector.onTouchEvent(event)) { | ||
| true | ||
| } else { | ||
| v.onTouchEvent(event) | ||
| } | ||
| } |
| 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 |
…for Kotlin, Java, and Compose
|
🎉 This PR is included in version 1.10.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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 (
ApiDemosandComposeDemos), alongside automated visual tests, performance optimizations, and stability polish.Features Included in This PR
AdvancedCameraAnimationActivity)PathFollowingActivity)DataVisualizationActivity)extruded = true).RoadmapModeActivity)ROADMAP,HYBRID, andSATELLITEmodes with dynamic camera orientation.FieldOfViewActivity)Tooling & Code Health
./gradlew spotlessApplyacross all modified files to strictly adhere to standard 4-spacektlintrules and remove all formatting diff noise../gradlew test assembleDebugand./gradlew spotlessCheckwith 100% passing results across all modules.