googlemaps / android-maps-utils

Maps SDK for Android Utility Library
https://developers.google.com/maps/documentation/android-sdk/utility
Apache License 2.0
3.55k stars 1.53k forks source link

feat: add support for parsing GroundOverlay with LatLonQuad bounds #1396

Open noberasco opened 3 weeks ago

noberasco commented 3 weeks ago

This PR adds support for parsing ground overlays with with bounds in LatLonQuad format. In case bounds are provided in both LatLonQuad and LatLonBox formats, pre-existing behavior (get bounds from LatLonBox) is preferred.

Fixes #650 🦕

Example:

        <GroundOverlay>
            <name>Lipno_0_0</name>
            <Icon>
                <href>files/Lipno_0_0.png</href>
                <viewBoundScale>0.75</viewBoundScale>
            </Icon>
            <gx:LatLonQuad>
                <coordinates>
                    14.034257,48.741688,0 14.051202,48.743284,0 14.049553,48.75094799999999,0 14.032606,48.74935199999999,0 
                </coordinates>
            </gx:LatLonQuad>
        </GroundOverlay>
        <GroundOverlay>
            <name>Lipno_0_1</name>
            <Icon>
                <href>files/Lipno_0_1.png</href>
                <viewBoundScale>0.75</viewBoundScale>
            </Icon>
            <gx:LatLonQuad>
                <coordinates>
                    14.051205,48.743288,0 14.068161,48.74488199999999,0 14.066517,48.752545,0 14.049567,48.750952,0 
                </coordinates>
            </gx:LatLonQuad>
        </GroundOverlay>
... more ground overlays ...

become: Screenshot_20241002_170426_ET BETA

google-cla[bot] commented 3 weeks ago

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.

conventional-commit-lint-gcf[bot] commented 3 weeks ago

🤖 I detect that the PR title and the commit message differ and there's only one commit. To use the PR title for the commit history, you can use Github's automerge feature with squashing, or use automerge label. Good luck human!

-- conventional-commit-lint bot https://conventionalcommits.org/