Skip to content

Add Rectangles + Functionality to set size on click + rotation #2723

Open
@ClausRogisch

Description

@ClausRogisch

Is your feature request related to a problem? Please describe.
I am creating a plan for a venue and there are big team tents that need to be placed. the dimensions of the tents are known.

Describe the solution you'd like
On editing, i want an option to "draw" a rectangle (located unterneath the "add polygon"). (like in the leaflet demo)
But when i only click on the map, i want a dialog to open, that lets me set height and width in meters and then create the rectangle in the center of my click.
Behaviour similar to graphic programs, that let you drag the shape of a rectangle or on click define the size.

Additionally it would be nice to be able to rotate the rectangles, as the tents are not always oriented orthogonal to the map

Describe alternatives you've considered
Drawing the shape by hand and afterwards measuring the the dimensions. Also editing the shape till the orientation fits.

Additional context
i tried to make the "leaflet-path-transform" work, without luck on integration. Stumbled across the https://github.com/onaci/Leaflet.draw.rotate but did not try to integrate it.

Would be nice to get feedback, whether the mentioned methods would be a fitting approach, maybe even for integration in leaflet and not only a customization in umap

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions