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

Allow patterned polylines #18

Merged
merged 7 commits into from
Sep 24, 2024

Conversation

haysmike
Copy link
Contributor

image

Comment on lines 44 to 53
linePatternId?.let {
val id = it.toString()
if (mapApplier.style.getImage(id) == null) {
val vectorDrawable = context.getDrawable(it) as? VectorDrawable
if (vectorDrawable == null) {
mapApplier.style.addImage(
id,
ImageBitmap.imageResource(it).asAndroidBitmap()
)
} else {
vectorDrawable.let { drawable ->
mapApplier.style.addImage(id, drawable)
}
}
}
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is basically copied from the Symbol implementation. Should we extract? I kind of prefer the impl here since it uses the refined inner variable instead of the nullable outer variable, but open to feedback.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let's pull out a helper

Copy link
Contributor Author

Choose a reason for hiding this comment

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

And add ktfmtFormat

@haysmike
Copy link
Contributor Author

Those corners look terrible 😬

@haysmike haysmike force-pushed the haysmike/patterned-polylines branch from 9b75cfa to e2ed403 Compare September 10, 2024 00:13
@haysmike haysmike marked this pull request as ready for review September 10, 2024 19:56
@haysmike
Copy link
Contributor Author

Bump version to 0.1.1

Copy link
Collaborator

@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.

I think this is good enough for now; let's merge and see how it works in practice :)

@ianthetechie ianthetechie merged commit 26fccdd into Rallista:main Sep 24, 2024
3 checks passed
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