Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Guides for 90 degree #327

Closed
mohammedzamakhan opened this issue Aug 1, 2018 · 8 comments
Closed

Guides for 90 degree #327

mohammedzamakhan opened this issue Aug 1, 2018 · 8 comments

Comments

@mohammedzamakhan
Copy link
Contributor

Is there a way where I can have extra guide to show 90 degree to the user when he is in the quadrant of 45degrees to the last line.

I do not want leaflet.pm to add it, but if I can know if there is a event or something that can help me build it myself.

screen shot 2018-08-01 at 11 46 41 am

the quadrants would be like this, but we would not be showing that in the UI
screen shot 2018-08-01 at 11 50 21 am

@codeofsumit
Copy link
Contributor

mh good question. I would try it like this:

map.on('pm:drawstart', function(e) {
    var layer = e.workingLayer;
    layer.on('pm:vertexadded', function(e) {
        // e includes the new vertex, it's marker
        // the index in the coordinates array
        // the working layer and shape
    });
});

in vertexadded you should get the latest coordinate that is added to the shape. You can place your guide in reference to it. Does this help?

@mohammedzamakhan
Copy link
Contributor Author

I want the 90 degree guide only while dragging, these events are only called after you add.

@codeofsumit
Copy link
Contributor

codeofsumit commented Aug 2, 2018

Could you place it at the cursor after drawstart?

@mohammedzamakhan
Copy link
Contributor Author

When the angle between the blue dotted line and the violet dotted like is really less, we also want it to snap to the purple perpendicular guide.

@codeofsumit
Copy link
Contributor

Ok sounds like you’d need an additional event. Shouldn’t be that hard. Marked as feature request! Feel free to submit a PR if you would like to help

@hoanphi2201
Copy link

@codeofsumit @mohammedzamakhan Any update for this feature.

@Falke-Design
Copy link
Collaborator

@hoanphi2201 there are no updates on this, and it will not implemented soon from our side. You can use the Sub-Library https://github.com/Falke-Design/PMOrtho it is working with the latest version 2.9.0

Same Feature Requests: #559, #327

@dailyprice
Copy link

This has been added as a feature in Geoman Pro: Link to docs

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

No branches or pull requests

5 participants