Skip to content
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

Add support for OS Maps API #3328

Merged
merged 6 commits into from Mar 1, 2021
Merged

Add support for OS Maps API #3328

merged 6 commits into from Mar 1, 2021

Conversation

dracos
Copy link
Member

@dracos dracos commented Feb 23, 2021

OS Maps key, layer, URL, and whether it's premium or not can be provided on a per-cobrand basis. In order to do that I had to switch the OSM map classes to use Moo (so e.g. number of zoom levels could look at configuration to work itself out), which hopefully tidies it up a bit at the same time.

The other base change was to store the cobrand being used to set a map class, not just the map class. This is so that, if you are in the scenario where someone is generating a map on a OS-Maps-API-using cobrand, for a report that was generated on a non-OS-Maps-API-using cobrand, it would still be able to access the right information for the API key etc.

@codecov
Copy link

codecov bot commented Feb 23, 2021

Codecov Report

Merging #3328 (da6b256) into master (9bd718b) will increase coverage by 0.05%.
The diff coverage is 89.79%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3328      +/-   ##
==========================================
+ Coverage   82.21%   82.27%   +0.05%     
==========================================
  Files         320      324       +4     
  Lines       21375    21356      -19     
  Branches     3214     3213       -1     
==========================================
- Hits        17574    17571       -3     
+ Misses       2753     2742      -11     
+ Partials     1048     1043       -5     
Impacted Files Coverage Δ
perllib/FixMyStreet/Cobrand/UK.pm 77.77% <50.00%> (-0.26%) ⬇️
perllib/FixMyStreet/DB/Result/Problem.pm 90.18% <66.66%> (+0.07%) ⬆️
perllib/FixMyStreet/Map/OS/API.pm 66.66% <66.66%> (ø)
perllib/FixMyStreet/Map/Base.pm 88.88% <88.88%> (ø)
perllib/FixMyStreet/Map/FMS.pm 95.23% <90.00%> (-4.77%) ⬇️
perllib/FixMyStreet/Map/OSM.pm 96.55% <90.00%> (+2.23%) ⬆️
perllib/FixMyStreet/App.pm 88.00% <100.00%> (ø)
perllib/FixMyStreet/Map.pm 98.38% <100.00%> (+0.17%) ⬆️
perllib/FixMyStreet/Map/Bing.pm 100.00% <100.00%> (ø)
perllib/FixMyStreet/Map/Bromley.pm 100.00% <100.00%> (+33.33%) ⬆️
... and 20 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9bd718b...046aac7. Read the comment docs.

@dracos dracos requested a review from davea February 23, 2021 17:19
Copy link
Member

@davea davea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One question, but looks great overall! 👍

perllib/FixMyStreet/Cobrand/UKCouncils.pm Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants