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
Hello. I have a kml file that uses the xmlns:gx="http://www.google.com/kml/ext/2.2" namespace and uses the gx:LatLonQuad node with the coordinates defining the lat/lon coordinates of the box, instead of LatLonBox
When loading this kml file to KmlLayer, it throws an exception because I believe it doesn't read the gx:LatLonQuad node, but instead is looking for LatLonBox to parse the north, south, east, and west nodes. The following exception trace is as follows:
java.lang.NullPointerException: Attempt to invoke virtual method 'double java.lang.Double.doubleValue()' on a null object reference
at com.google.maps.android.data.kml.KmlFeatureParser.createLatLngBounds(KmlFeatureParser.java:452)
at com.google.maps.android.data.kml.KmlFeatureParser.createGroundOverlay(KmlFeatureParser.java:150)
at com.google.maps.android.data.kml.KmlContainerParser.assignPropertiesToContainer(KmlContainerParser.java:113)
at com.google.maps.android.data.kml.KmlContainerParser.createContainer(KmlContainerParser.java:67)
at com.google.maps.android.data.kml.KmlParser.parseKml(KmlParser.java:89)
at com.google.maps.android.data.kml.KmlLayer.parseKml(KmlLayer.java:189)
at com.google.maps.android.data.kml.KmlLayer.<init>(KmlLayer.java:156)
at com.google.maps.android.data.kml.KmlLayer.<init>(KmlLayer.java:79)
This kml file works when loading to Google Earth by the way.
Is there plans to support gx:LatLonQuad in later releases?
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!
Activity
arriolac commentedon Mar 6, 2020
Thanks for reporting. This was not something we were planning on adding, however, contributions are certainly welcome to get this working.
arriolac commentedon Mar 6, 2020
Would you mind sharing an example KML file / snippet in case someone wants to take this on?
acespring78 commentedon Mar 6, 2020
Here's a sample. The
iconfield can be replaced with any image file, but the key item here is thegx:LatLonQuadnode and the absence of theLatLonBoxstale commentedon Sep 2, 2020
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!
acespring78 commentedon Sep 2, 2020
Hi, do we know if there are still plans to support
gx:LatLonQuadin the near future?stale commentedon Dec 31, 2020
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!
stale commentedon Jul 1, 2021
Closing this. Please reopen if you believe it should be addressed. Thank you for your contribution.
noberasco commentedon Oct 3, 2024
Old ticket, but it has recently become relevant to one of our workflows (offline cartography), so I have raised a PR to fix this...