MAPSAND-379 Style getter extension functions do not save property values
Summary of changes
This branch adds support to preserve cached layer properties during the getLayer call.
We then use any cached properties when the layer is later added to the style.
See related PR in mapbox-maps-android-internal which update the tests in this PR.
User impact (optional)
Should not be any.
Pull request checklist:
- [x] Briefly describe the changes in this PR.
- [ ] Include before/after visuals or gifs if this PR includes visual changes.
- [x] Write tests for all new functionality. If tests were not written, please explain why.
- [ ] Optimize code for java consumption (
@JvmOverloads,@file:JvmName, etc). - [ ] Add example if relevant.
- [ ] Document any changes to public APIs.
- [ ] Run
make update-apito update generated api files, if there's public API changes, otherwise theverify-api-*CI steps might fail. - [x] Update CHANGELOG.md or use the label 'skip changelog', otherwise
check changelogCI step will fail. - [ ] If this PR is a
v10.[version]release branch fix / enhancement, merge it tomainfirstly and then port tov10.[version]release branch.
Fixes: https://mapbox.atlassian.net/browse/MAPSAND-379
PRs must be submitted under the terms of our Contributor License Agreement CLA.
@paulrenn67 I added bug label - verify-code will not pass then until you add the changelog entry. However in your case it's failing because of ktlint as well. Could you please fix that so that CI will start?
Unit tests are failing with ClassCastExceptions...