- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 221
 
Description
OS & Hardware
Ubuntu + Docker
Version
0.34.0
Describe the bug
When creating areas on the map page, the only option for creation appears to be circles. However, the docs page specifies that "You can draw a rectangle, a circle or a polygon." Is this an error or is there a secondary way to add areas? Either way, an update to the docs would probably be warranted. The docs also specify that the button is "Create area," but the actual dialog says "Draw a circle."
To Reproduce
Steps to reproduce the behavior:
- Open the map page and enable areas in the map layers dialog.
 - Click on the "Draw a circle."
 - Only option is then a circle, not a rectangle or polygon.
 
Expected behavior
Per the docs, there should be a way to create a rectangle or polygon area.
Logs
Logs do not appear relevant but I can provide them if they are requested. There are no log entries associated with the create area function except for:
Browser console:
Enabled layers saved: 
Array(5) [ "Routes", "Heatmap", "Areas", "Suggested Visits", "Confirmed Visits" ]
[maps_controller-989519fe576507a44ba37c3f01b70d703626beb080fe5ff41517419646b48121.js:638:17](http://192.168.12.2:3000/assets/controllers/maps_controller-989519fe576507a44ba37c3f01b70d703626beb080fe5ff41517419646b48121.js)
Save button clicked [areas:160:15](http://192.168.12.2:3000/assets/maps/areas)
Docker logs:
  TRANSACTION (0.2ms)  BEGIN
  ↳ app/controllers/api/v1/areas_controller.rb:15:in 'Api::V1::AreasController#create'
  Area Create (3.3ms)  INSERT INTO "areas" ("name", "user_id", "longitude", "latitude", "radius", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"  [["name", "LAX T1-3"], ["user_id", 1], ["longitude", "[FILTERED]"], ["latitude", "[FILTERED]"], ["radius", 416], ["created_at", "2025-10-27 17:36:28.073895"], ["updated_at", "2025-10-27 17:36:28.073895"]]
  ↳ app/controllers/api/v1/areas_controller.rb:15:in 'Api::V1::AreasController#create'
  TRANSACTION (2.6ms)  COMMIT
  ↳ app/controllers/api/v1/areas_controller.rb:15:in 'Api::V1::AreasController#create'
{"method":"POST","path":"/api/v1/areas","format":"*/*","controller":"Api::V1::AreasController","action":"create","status":201,"allocations":3986,"duration":29.68,"view":0.37,"db":9.87}
Additional context
For my use case, polygon areas would be very useful. Thanks in advance for looking into this!
