Closed
Description
Hi,
API ver: android-maps-utils:0.6.2
OS: android
issue: when adding multiple KmlLayers, the app crashes when clicking on any item in the KmlLayer.
How to reproduce:
-
add 2 KmlLayers (for example using "
new KmlLayer
" twice) -
click on any item. It will crash, since feature is null in the onFeatureClick!!
KmlLayer kmlLayer = new KmlLayer(mMap, new ByteArrayInputStream(byteArr), KmlDemoActivity.this); kmlLayer.addLayerToMap(); kmlLayer.setOnFeatureClickListener(new KmlLayer.OnFeatureClickListener() { @Override public void onFeatureClick(Feature feature) { Toast.makeText(KmlDemoActivity.this, "Feature clicked: " + feature.getId(), Toast.LENGTH_SHORT).show(); } });