-
Notifications
You must be signed in to change notification settings - Fork 1.5k
fix(KmlLayer): Update constructor to take in a Context instead #631
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
Codecov Report
@@ Coverage Diff @@
## master #631 +/- ##
==========================================
- Coverage 19% 18.99% -0.01%
==========================================
Files 71 71
Lines 4056 4037 -19
Branches 610 607 -3
==========================================
- Hits 771 767 -4
+ Misses 3251 3238 -13
+ Partials 34 32 -2
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.
LGTM! Two comments in-line.
@@ -128,7 +128,7 @@ public void onFeatureClick(Feature feature) { | |||
KmlLayer kmlPolygonLayer; | |||
try { | |||
// KML Polyline | |||
kmlPolylineLayer = new KmlLayer(getMap(), R.raw.south_london_line_kml, this, markerManager, polygonManager, polylineManager, groundOverlayManager); | |||
kmlPolylineLayer = new KmlLayer(getMap(), R.raw.south_london_line_kml, this, markerManager, polygonManager, polylineManager, groundOverlayManager, null); |
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.
Suggestion - in this or KmlDemoActivity, include an example of passing in the cache
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.
Ah, good point. I'll update KmlDemoActivity
and reuse the RetainFragment
+ ImagesCache
strategy there
@@ -127,29 +129,23 @@ | |||
* Creates a new Renderer object for KML features | |||
* | |||
* @param map map to place objects on | |||
* @param activity activity needed to add info windows and retain bitmap cache fragment | |||
* @param context the Context | |||
* @param markerManager marker manager to create marker collection from | |||
* @param polygonManager polygon manager to create polygon collection from | |||
* @param polylineManager polyline manager to create polyline collection from | |||
* @param groundOverlayManager ground overlay manager to create ground overlay collection from |
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.
imagesCache
should be added to Javadoc with a description
Updating
KmlLayer
,KmlRenderer
, andRenderer
, to accept aContext
instead of aFragmentActivity
. The former signature and solution presents a couple of issues mentioned in #629.This change does break configuration change handling for caching images in a way that
retaining state across these changes is now handled by the caller (i.e. by passing in
an
ImagesCache
instance viaKmlLayer
constructor).Fixes #629 🦕