android-maps-utils
android-maps-utils copied to clipboard
Dead KML code in Renderer.addGeoJsonFeatureToMap()
There appears to be a bunch of dead code in Renderer.addGeoJsonFeatureToMap() that references KML and looks like:
} else if (feature instanceof KmlPlacemark) {
markerOptions = ((KmlPlacemark) feature).getMarkerOptions();
}
KML handling shouldn't be done in this method - it should be handled in Renderer.addKmlPlacemarkToMap().
I believe this code is dead and can be removed, but further testing is needed.
Environment details
Master branch as of https://github.com/googlemaps/android-maps-utils/commit/6c370ab171cfc6d264e075692b58252d1484a123
Steps to reproduce
- Look at Renderer.addGeoJsonFeatureToMap()
Code example
See above
Stack trace
N/A
As I was working on these changes https://github.com/googlemaps/android-maps-utils/pull/609 as well as support for KMZ files, which I can make a PR for as soon as this one is merged, I noticed there is quite a bit of code in Renderer that is specific to either KmlRenderer or GeoJsonRenderer. There are separate Renderer constructors that only each of the subclasses use, for example, where fields are either initialized or not because they're not even used in the other subclass. There are also places where the code checks for instanceof GeoJsonFeature or instanceof KmlPlacemark to have behavior specific to one or the other. It'd be good to suss out these KML and GeoJSON specific parts and move the code into the proper Renderer subclass, either KmlRenderer or GeoJsonRenderer.
@jeffdgr8 Agreed, I noticed the same. In https://github.com/googlemaps/android-maps-utils/pull/351 the GeoJSON and KML implementations were merged, but there are still improvements to be made.
This issue has been automatically marked as stale because it has not had recent activity. Please comment here if it is still valid so that we can reprioritize. Thank you!
Still valid
This issue has been automatically marked as stale because it has not had recent activity. Please comment here if it is still valid so that we can reprioritize. Thank you!
Still valid
This issue has been automatically marked as stale because it has not had recent activity. Please comment here if it is still valid so that we can reprioritize. Thank you!
This issue has been automatically marked as stale because it has not had recent activity. Please comment here if it is still valid so that we can reprioritize. Thank you!
This issue has been automatically marked as stale because it has not had recent activity. Please comment here if it is still valid so that we can reprioritize. Thank you!
Closing this. Please reopen if you believe it should be addressed. Thank you for your contribution.
This issue has been automatically marked as stale because it has not had recent activity. Please comment here if it is still valid so that we can reprioritize. Thank you!
This issue has been automatically marked as stale because it has not had recent activity. Please comment here if it is still valid so that we can reprioritize. Thank you!
Not stale