You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Steps to reproduce:
Create a KML File as layer and a Icon with the example code from the IconGenerator.
If the user tap on the icon, the apps crashes. Without the kml layers it is working.
// Adds KML File
KmlLayer kmlLayer = null;
try {
kmlLayer = new KmlLayer(mMap, R.raw.overlay_stadtmitte, getApplicationContext());
kmlLayer.addLayerToMap();
} catch (XmlPullParserException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
// Add a marker in Darmstadt and move the camera
LatLng darmstadt = new LatLng(49.877572, 8.654379);
mMap.moveCamera(CameraUpdateFactory.newLatLng(darmstadt));
mMap.moveCamera(CameraUpdateFactory.zoomTo(14));
// Add a IconLabel
IconGenerator iconFactory = new IconGenerator(this);
addIcon(iconFactory, "Default", new LatLng(49.877571, 8.654373));
}
private void addIcon(IconGenerator iconFactory, CharSequence text, LatLng position) {
MarkerOptions markerOptions = new MarkerOptions().
icon(BitmapDescriptorFactory.fromBitmap(iconFactory.makeIcon(text))).
position(position).
anchor(iconFactory.getAnchorU(), iconFactory.getAnchorV());
mMap.addMarker(markerOptions);
}
Expected behavior:
The App shows the Icon and the KML Layer without problems.
Observed behavior:
10-03 13:08:27.874 26306-26306/com.ueruem.campusnavitudarmstadt E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.ueruem.campusnavitudarmstadt, PID: 26306
java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference
at java.io.StringReader.<init>(StringReader.java:50)
at android.text.HtmlToSpannedConverter.convert(Html.java:758)
at android.text.Html.fromHtml(Html.java:245)
at android.text.Html.fromHtml(Html.java:188)
at com.google.maps.android.kml.KmlRenderer$1.getInfoContents(KmlRenderer.java:592)
at com.google.android.gms.maps.GoogleMap$7.zzi(Unknown Source)
at com.google.android.gms.maps.internal.zzd$zza.onTransact(Unknown Source)
at android.os.Binder.transact(Binder.java:499)
at ue.b(:com.google.android.gms.DynamiteModulesB:112)
at maps.ad.G.a(Unknown Source)
at maps.ad.G.a(Unknown Source)
at maps.D.c.a(Unknown Source)
at maps.D.d.c(Unknown Source)
at maps.ad.S.g(Unknown Source)
at maps.ad.T.b(Unknown Source)
at maps.D.c.a(Unknown Source)
at maps.V.k.a(Unknown Source)
at maps.V.u.d(Unknown Source)
at maps.V.P.onSingleTapConfirmed(Unknown Source)
at maps.z.e$b.onSingleTapConfirmed(Unknown Source)
at maps.z.c$a.handleMessage(Unknown Source)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
Device and Android version:
Nexus 6p with Android 7. The App is <4.2 Android.
Screenshots:
Can be created by pressing the Volume Down and Power Button at the same time on Android 4.0 and higher.
The text was updated successfully, but these errors were encountered:
I think this is the same as the one we posted, but under different behaviour - #327
How is your KML formatted, with name and description nodes? Please check the #327 and see if you can replicate it once with name and description and once without description and some nodes with description.
Summary:
I want to show a KML Layer and the IconGenerator.
Steps to reproduce:
Create a KML File as layer and a Icon with the example code from the IconGenerator.
If the user tap on the icon, the apps crashes. Without the kml layers it is working.
Expected behavior:
The App shows the Icon and the KML Layer without problems.
Observed behavior:
Device and Android version:
Nexus 6p with Android 7. The App is <4.2 Android.
Screenshots:
Can be created by pressing the Volume Down and Power Button at the same time on Android 4.0 and higher.
The text was updated successfully, but these errors were encountered: