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
When a kml file is badly formatted and some Nodes have name and description and others just name, onclick of the marker a NullPointerException is triggered at com.google.maps.android.kml.KmlRenderer$1.getInfoContents(KmlRenderer.java:592)
java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference
Steps to reproduce:
Load a KML file such as <Placemark> <name>Ulmer Park - Brooklyn Public Library</name> <Point><coordinates> -73.98868209572987,40.59265312974389 </coordinates></Point> </Placemark><Placemark> <name>Hollis</name> <description>Test</description> <Point><coordinates> -73.76230411230962,40.720168429639706 </coordinates></Point> </Placemark>
Expected behavior:
Should display either both snippets over the marker, one with the Title and Description or None, but not crash. If the KML has all Nodes with both properties or just one property (name for example) the app does not crash, but it also does not show an Info Window
setMarkerInfoWindow
should be extended to include
} else if (hasName && !hasDescription || !hasName && hasDescription) {
if(hasName)
marker.setTitle(placemark.getProperty("name"));
else if(hasDescription)
marker.setTitle(placemark.getProperty("description"));
createInfoWindow();
}
Observed behavior:
Crashes on Marker press /show info window
Device and Android version:
Nexus 5x, Android 6.0.1, maps util 0.4.4 and 0.4.5
The text was updated successfully, but these errors were encountered:
Summary:
When a kml file is badly formatted and some Nodes have name and description and others just name, onclick of the marker a NullPointerException is triggered at com.google.maps.android.kml.KmlRenderer$1.getInfoContents(KmlRenderer.java:592)
java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference
Steps to reproduce:
Load a KML file such as
<Placemark> <name>Ulmer Park - Brooklyn Public Library</name> <Point><coordinates> -73.98868209572987,40.59265312974389 </coordinates></Point> </Placemark><Placemark> <name>Hollis</name> <description>Test</description> <Point><coordinates> -73.76230411230962,40.720168429639706 </coordinates></Point> </Placemark>
Expected behavior:
Should display either both snippets over the marker, one with the Title and Description or None, but not crash. If the KML has all Nodes with both properties or just one property (name for example) the app does not crash, but it also does not show an Info Window
setMarkerInfoWindow
should be extended to include
} else if (hasName && !hasDescription || !hasName && hasDescription) {
if(hasName)
marker.setTitle(placemark.getProperty("name"));
else if(hasDescription)
marker.setTitle(placemark.getProperty("description"));
}
Observed behavior:
Crashes on Marker press /show info window
Device and Android version:
Nexus 5x, Android 6.0.1, maps util 0.4.4 and 0.4.5
The text was updated successfully, but these errors were encountered: