Skip to content

ROU-12638: Adding TerraDraw drawing tools#251

Merged
rugoncalves merged 72 commits into
devfrom
ROU-12638
Mar 27, 2026
Merged

ROU-12638: Adding TerraDraw drawing tools#251
rugoncalves merged 72 commits into
devfrom
ROU-12638

Conversation

@rugoncalves
Copy link
Copy Markdown
Contributor

@rugoncalves rugoncalves commented Mar 23, 2026

This PR introduces the support to a new provider for the drawing tools: TerraDraw. The reason being related with the upcoming decommission of Google Maps Drawing Tools in version 3.65 (May 2026). The changes include new configuration classes, abstract base classes for TerraDraw tools, and provider-specific logic for handling drawing events and feature creation. The Drawing Tools factory is updated to instantiate TerraDraw tools for Google Maps, and a new error code is added for shape creation failures.

Read the Architecture Decision Record 2 for more context.

What was happening

  • Google Maps is decommissioning Drawing Tools on version 3.65;
  • A new provider for the Drawing Tools need to be supported;

What was done

  • Added classes to support TerraDraw provider;
  • New folder was created for Providers that are not maps;
  • Added new API to enable using Google Maps Drawing Tools, while it's possible: OutSystems.Maps.MapAPI.DrawingToolsManager.SetUseTerraDraw( true | false );
  • Added new dev dependency for TerraDraw;
  • Changed the ECMA script target of the compilation: es2017 » es2020;
  • Added the ADR-0002-Replace-Google-DrawingManager-with-TerraDraw.md
  • Updated Google Maps default version: 3.63 (quarterly updates from Mid-February 2026 onward)

Test Steps

A. Using TerraDraw provider:

  1. Enter the test "DrawingTools"
  2. Try to use the drawing tools
  3. Validate that the shapes are added to the map
    B. Using Google Maps provider:
  4. Enter the test "DrawingTools_google"
  5. Run the command OutSystems.Maps.MapAPI.DrawingToolsManager.SetUseTerraDraw(false) before the map is created;
  6. Try to use the drawing tools
  7. Validate that the shapes are added to the map

Screenshots

Class-Diagram--OutSystems-Maps--TerraDraw

Checklist

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

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 31 out of 34 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/Providers/DrawingTools/TerraDraw/DrawingTools.ts
Comment thread src/Providers/DrawingTools/TerraDraw/DrawingTools.ts
Comment thread src/Providers/DrawingTools/TerraDraw/DrawingToolsUI.ts
@gnbm
Copy link
Copy Markdown
Collaborator

gnbm commented Mar 24, 2026

@rugoncalves have you checked CoPilot's comments?

Copy link
Copy Markdown
Collaborator

@gnbm gnbm left a comment

Choose a reason for hiding this comment

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

Left a couple of comments.
Take a look at Copilot's feedback as well

Comment thread src/OutSystems/Maps/MapAPI/DrawingToolsManager.ts Outdated
Comment thread src/OSFramework/Maps/DrawingTools/AbstractDrawingTools.ts
Comment thread src/OutSystems/Maps/MapAPI/DrawingToolsManager.ts Outdated
Comment thread src/Providers/DrawingTools/TerraDraw/Factory.ts Outdated
Comment thread src/Providers/Maps/Google/OSMap/OSMap.ts Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 31 out of 34 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/Providers/DrawingTools/TerraDraw/Tools/DrawMarker.ts
Comment thread src/Providers/DrawingTools/TerraDraw/DrawingToolsUI.ts Outdated
Comment thread src/OutSystems/Maps/MapAPI/DrawingToolsManager.ts
Comment thread src/OSFramework/Maps/DrawingTools/AbstractDrawingTools.ts Outdated
@gnbm gnbm self-requested a review March 25, 2026 18:48
Comment thread src/OutSystems/Maps/MapAPI/DrawingToolsManager.ts
Comment thread src/Providers/DrawingTools/TerraDraw/DrawingToolsUI.ts
@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown
Collaborator

@gnbm gnbm left a comment

Choose a reason for hiding this comment

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

LGTM

@rugoncalves rugoncalves merged commit 13e00b2 into dev Mar 27, 2026
16 checks passed
@rugoncalves rugoncalves deleted the ROU-12638 branch March 27, 2026 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants