-
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
fix: Correctly parse <hotSpot>
elements
#1173
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Hi @SpecialMike! I have left a couple of comments, mainly regarding your changes in the Let me know if you have any questions. |
Sorry, I don't think I meant to include that change, it was just me trying to get this built to work with another project for testing. I force-pushed to remove that commit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
## [3.8.1](v3.8.0...v3.8.1) (2023-12-20) ### Bug Fixes * Correctly parse `<hotSpot>` elements ([#1173](#1173)) ([643d351](643d351))
🎉 This PR is included in version 3.8.1 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Fixes #1172
The library currently never parses
<hotSpot>
element in KML, because they are always empty tags. A valid<hotSpot>
element should be empty, with the necessary attributes like the following:I also adjusted the test for parsing
<hotSpot>
to be a valid KML file (none ofx
,y
,xunits
, oryunits
are valid attributes for<Style>
), and with a valid and invalid<hotSpot
> in the case of an invalid<hotSpot>
the default anchor should be used.Finally, I also added some warnings to clarify that the library only supports
xunits
andyunits
that have the value"fraction"
. I would recommend that this clarification is made in the KML support table in the official developer docs. The warnings are the best way to let a user know about this, since there are other values that are part of the KML spec, and it's confusing why the<hotSpot>
for a style isn't working when the units are"pixels"
or"insetPixels"
.In order to test with another application, I had to update the root and library
build.gradle
files to support Jitpack. Let me know if I should take these changes out of the PR, but the current Jitpack override in the librarybuild.gradle
does not work.