Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrades to improved MapLibre Compose #156

Merged
merged 9 commits into from
Jul 17, 2024

Conversation

Archdoog
Copy link
Collaborator

@Archdoog Archdoog commented Jul 16, 2024

  • Adds camera padding feature to correctly place user puck on landscape and portrait navigation view.
  • Hides compass
  • Moves attribution button and maplibre logo.
  • Pitch works!
  • Upgrades any maplibre types to org.maplibre.android

@Archdoog Archdoog self-assigned this Jul 16, 2024
@Archdoog Archdoog marked this pull request as ready for review July 16, 2024 04:04
@Archdoog Archdoog requested a review from ianthetechie July 16, 2024 04:41
Copy link
Contributor

@ianthetechie ianthetechie left a comment

Choose a reason for hiding this comment

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

When testing this, I ran into some issues. An API 35 emulator crashed instantly (ok it's dev; whatever...). An API 34 emulator is also segfaulting. It's crashing in a GL thread, which suggests it's related to MapLibre (not 100% sure but seems likely here).

2024-07-16 16:27:14.329  9192-9267  libc                    com.stadiamaps.ferrostar.demo        A  Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x30 in tid 9267 (GLThread 71), pid 9192 (.ferrostar.demo)

At first I thought it was related to the padding but I'm not sure now.

Is this working for you? If so, can you give more config details? Here's my AVD config:

image

fun CameraPadding.Companion.NavigationPortrait(): CameraPadding {
return CameraPadding(
start = 0.0,
top = 1300.0,
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think this will work. At the very least it doesn't generalize to other screen sizes.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is gone and replaced by a much improved dynamic @composable.

* A camera padding configuration for a navigation map view that places the user puck in the lower
* center of the screen.
*/
fun CameraPadding.Companion.NavigationPortrait(): CameraPadding {
Copy link
Contributor

Choose a reason for hiding this comment

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

General Android lint I noticed... I know what you're going for here though ;) Not sure if it's the right way or not TBH. I won't block the PR for this but something to think about.

image

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yep. I've been ignoring those to keep it "kotlin enum like". I could put an actual suppression on it to note it's an intentional decision.

@Archdoog
Copy link
Collaborator Author

When testing this, I ran into some issues. An API 35 emulator crashed instantly (ok it's dev; whatever...). An API 34 emulator is also segfaulting. It's crashing in a GL thread, which suggests it's related to MapLibre (not 100% sure but seems likely here).

2024-07-16 16:27:14.329  9192-9267  libc                    com.stadiamaps.ferrostar.demo        A  Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x30 in tid 9267 (GLThread 71), pid 9192 (.ferrostar.demo)

At first I thought it was related to the padding but I'm not sure now.

Is this working for you? If so, can you give more config details? Here's my AVD config:

image

This branch has maplibre-compose 0.0.13, which reverts to maplibre 10. Testing proves the crash is not there.

@ianthetechie ianthetechie merged commit f118c18 into main Jul 17, 2024
14 checks passed
@ianthetechie ianthetechie deleted the feat/android/maplibre-compose-0.0.10 branch July 17, 2024 03:35
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.

2 participants