Skip to content

RGRIDT-883: [Maps] Drawing Tools - Polyline Block#37

Merged
tmbp95 merged 8 commits intodevfrom
RGRIDT-883
Sep 22, 2021
Merged

RGRIDT-883: [Maps] Drawing Tools - Polyline Block#37
tmbp95 merged 8 commits intodevfrom
RGRIDT-883

Conversation

@tmbp95
Copy link
Contributor

@tmbp95 tmbp95 commented Sep 20, 2021

This PR is for RGRIDT-883: [Maps] Drawing Tools - Polyline Block

What was happening

  • As an OS developer, I want to enable my end-users to draw polylines on a Map in my App, so that they can highlight relevant locations, roads, or terrain features.

What was done

  • Added a new DrawPolyline block responsible for creating the new polylines on the map using the drawing tools.
  • Added a new Config for the draw Basic shapes (polyline is included here) that extends the DrawConfig (general drawing tools configurations)
  • Added the subscriber for the tool events as well as the unsubscriber
  • Added the new drawing tool to the Factory
  • Added the new method AddTool that is available as an API as well as the RemoveTool
  • Added the ChangeToolProperty and the GetDrawingToolsByToolUniqueId which finds the closest drawingTool from a tool
  • Created a set of new abstract classes / classes:
    • AbstractTool - responsible for all the OSFramwork tools
    • AbstractProviderTool - responsible for all the GoogleProvider tools
    • DrawShape - responsible for all the GoogleProvider drawing shape tools
    • DrawPolyshape - responsible for all the GoogleProvider drawing polylines/polygons tools
    • DrawPolyline - responsible for the drawing polylines tool

image

  • Added a new GenerateUniqueId method that allows generating new uniqueIds for the new shape elements that are going to be created by the drawingTools. We need this uniqueId to allow the developer to later use APIs over the element (shape/marker) that is the owner of that uniqueId.

Tests:

Test Cases Test steps
Platform “if” false DrawPolyline 1. Select the "Polyline" Button
2. Toggle Off the "Show/Hide Tool"
Expected: The drawPolyline block should not appear on the DrawingTools
Platform “if” true DrawPolyline 1. Select the "Polyline" Button
2.Toggle Off the "Show/Hide Tool"
3.Toggle On the "Show/Hide Tool"
Expected: The drawPolyline block should appear on the DrawingTools
DrawPolyline StrokeColor 1. Change the StrokeColor input to the color "Red"
2. Select the DrawPolyline tool on the drawing tools (hover the map)
3. Draw a Polyline on the Map
Expected: A new polyline should appear on the Map with the color "Red"
DrawPolyline StrokeOpacity 1. Change the StrokeOpacity input to "0.5"
2. Select the DrawPolyline tool on the drawing tools (hover the map)
3. Draw a Polyline on the Map
Expected: A new polyline should appear on the Map with the color "Black" and opacity 0.5
DrawPolyline StrokeWeight 1. Change the StrokeWeight input to "20"
2. Select the DrawPolyline tool on the drawing tools (hover the map)
3. Draw a Polyline on the Map
Expected: A new polyline should appear on the Map with a weight of 20

Screenshots

polylineDraw

Checklist

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

rugoncalves
rugoncalves previously approved these changes Sep 22, 2021
Copy link
Contributor

@rugoncalves rugoncalves left a comment

Choose a reason for hiding this comment

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

Just some minor comments! Good Job!

@tmbp95 tmbp95 merged commit 5239e07 into dev Sep 22, 2021
@tmbp95 tmbp95 deleted the RGRIDT-883 branch September 22, 2021 12:16
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.

3 participants