-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Crash on marker click #218
Comments
You should post the full stack trace and the important bits of your code. |
java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference |
After clicking a |
Yes. After marker click. |
Looks like your markers don't have any text set; see
My knowledge of kml is little. Looking at
/edit: Threw a short glimpse on https://developers.google.com/kml/documentation/kmlreference#feature - didn't see that any of these are actually mandatory. Might be a bug in the maps-utils. @markmcd You'll probably know better. |
Hi, This is the affected part of the kml:
I don't know how kml could be correct but I don't think if something is missing from the kml it should cause a crash. |
I guess I saw a KML validator on the interwebs - you could give it a try. |
Which part can be wrapped? The code (https:/googlemaps/android-maps-utils/blob/master/demo/src/com/google/maps/android/utils/demo/KmlDemoActivity.java) doesn't have custom infowindow part. |
@gitkobold based on your KML snippet I've created test file and it seem to cause no crash on latest library version <?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document>
<Style id="start">
<IconStyle>
<Icon>
<href>start.png</href>
</Icon>
</IconStyle>
</Style>
<Style id="finish">
<IconStyle>
<Icon>
<href>
finish.png
</href>
</Icon>
</IconStyle>
</Style>
<Style id="order">
<IconStyle>
<Icon>
<href>order.png</href>
</Icon>
</IconStyle>
</Style>
<Placemark>
<styleUrl>#start</styleUrl>
<name>Kiindulás</name>
<description/>
<Point>
<coordinates>19.0210083333,46.441605</coordinates>
</Point>
</Placemark>
</Document>
</kml> Based on your stacktrace, crash can happen only if Marker has no title. So this would use build-in window adapter (or you may create your own). |
Thanks a lot Vandalko, it's working! |
Fixed in 0d92651 |
When i try to render my kml file it gets crash on one of the markers click ,when i track the issue ,i find the issue NullPointerException in one of the in library.
The text was updated successfully, but these errors were encountered: