-
Notifications
You must be signed in to change notification settings - Fork 2
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
Allow patterned polylines #18
Conversation
haysmike
commented
May 17, 2024
![image](https://private-user-images.githubusercontent.com/659447/331456728-6ed546d6-e4f0-4479-9d0d-25697827133a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNTMzMTAsIm5iZiI6MTczOTE1MzAxMCwicGF0aCI6Ii82NTk0NDcvMzMxNDU2NzI4LTZlZDU0NmQ2LWU0ZjAtNDQ3OS05ZDBkLTI1Njk3ODI3MTMzYS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMFQwMjAzMzBaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1hZjI0ZTYxYTA3NTBjZTA1YTNkZWNkMDBiOWY0NjVmYWU4M2FjYzk2MjdhNjAxZjNmMDVjNDM4YWZiMDE2ZGMyJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.UUUBxyu7meEWfYzuQDk8aXPqBnNMbxMVB8OqWhf95UQ)
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) | ||
} | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And add ktfmtFormat
Those corners look terrible 😬 |
9b75cfa
to
e2ed403
Compare
Bump version to 0.1.1 |
There was a problem hiding this 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 :)