-
Notifications
You must be signed in to change notification settings - Fork 1.5k
feat(ktx): GeoJson and Kml KTX #628
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
Conversation
cab762c
to
167135a
Compare
Codecov Report
@@ Coverage Diff @@
## android-maps-utils-ktx #628 +/- ##
=======================================================
Coverage 18.99% 18.99%
=======================================================
Files 71 71
Lines 4037 4037
Branches 606 606
=======================================================
Hits 767 767
Misses 3238 3238
Partials 32 32 Continue to review full report at Codecov.
|
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.
Generally LGTM, but I think it would make sense to merge #631 first and then update this to match the new KmlLayer constructor signature before merging this PR.
inline fun kmlLayer( | ||
map: GoogleMap, | ||
@RawRes resourceId: Int, | ||
activity: FragmentActivity, |
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'd suggest merging #631 and then update this to take in a Context
and adding the cache parameter.
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.
Yep, agreed
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.
Updated fa1f839
Took a pass in the
geojson
andkml
packages to see what we can make Kotlin friendly. The only method I could find that we can improve is the constructor forGeoJsonLayer
andKmlLayer
.Before:
After:
Other changes:
inline
to avoid overhead of new memory allocations when using the ktx aliases vs. using the method/properties directly@ColorInt
annotations ingeojson
classes where I found it to be helpful@RawRes
annotation inkml
classKmlLayer
. Issue filed here Allow passing in a Context instead of a FragmentActivity when constructing KmlLayer #629