Skip to content

ROU-4776: adding ability to change google maps version - #184

Merged
rugoncalves merged 10 commits into
devfrom
ROU-4776
Oct 8, 2024
Merged

rugoncalves merged 10 commits into
devfrom
ROU-4776

Conversation

@rugoncalves

@rugoncalves rugoncalves commented Oct 7, 2024 •

Copy link
Copy Markdown
Contributor

This PR is to add new APIs to allow changing the version of Google Maps.

Context

Google Maps scripts cannot be hosted, and need to be imported from their CDN. If a version is not specified Google loads always the most recent stable version of the library. This was causing errors or warnings to appear, as neither the OutSystems R&D nor the developer using the component, control when the update was done.
To avoid this problems, the version of the Google Maps scripts being loaded was locked to a specific version (currently 3.57).

What was happening

  • However the change, made that the code is locked to a specific version of Google Maps
  • And the developer has no ability to change it

What was done

  • New APIs were added to getting and changing the version of the provider that is loaded
    • OutSystems.Maps.MapAPI.ProviderLibrary.GetVersion(#PROVIDERNAME#)
    • OutSystems.Maps.MapAPI.ProviderLibrary.SetVersion(#PROVIDERNAME#, #VERSION#, #FORCE_REFRESH#)
  • In Low-Code a site property was added GoogleMapsVersion to allow the developer to change the version

Test Steps

  1. Go to test page
  2. Write in the console OutSystems.Maps.MapAPI.ProviderLibrary.GetVersion('Google')
  3. Toggle the Map to be showed (assure the map appears)
  4. Repeat step # 2 (assure that the version is unchanged)
  5. Go to OutSystemsMaps in ServiceCenter
  6. Change the value of the version to another (e.g. 3.55)
  7. Navigate in the application
  8. Repeat step # 2 (assure that the version is unchanged)
  9. Refresh the page
  10. Repeat step # 2 (assure that the version is now CHANGED to the new version)
  11. Repeat step # 3

Checklist

  • tested locally
  • documented the code
  • clean all warnings and errors of eslint
  • requires changes in OutSystems (if so, provide a module with changes)
  • requires new sample page in OutSystems (if so, provide a module with changes)

@rugoncalves
rugoncalves requested a review from a team as a code owner October 7, 2024 15:54
@sonarqubecloud

sonarqubecloud Bot commented Oct 8, 2024

Copy link
Copy Markdown

@rugoncalves
rugoncalves merged commit 221d55e into dev Oct 8, 2024
@rugoncalves
rugoncalves deleted the ROU-4776 branch October 8, 2024 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants