Skip to content

Drawing a rectangle using leaflet.draw library doesn't work (it throws error in console). #1070

Open
@abhi5057

Description

  • I'm reporting a bug, not asking for help
  • I've looked at the documentation to make sure the behaviour is documented and expected
  • I'm sure this is a Leaflet Draw code issue, not an issue with my own code nor with the framework I'm using (Cordova, Ionic, Angular, React…)
  • I've searched through the issues to make sure it's not yet reported

How to reproduce

  • Leaflet version I'm using: 1.9.4
  • Leaflet Draw version I'm using: 1.0.4
  • Browser (with version) I'm using: Chrome
  • OS/Platform (with version) I'm using: Windows
  • step 1: Try to set up leaflet library in a basic js project and enable rectangle option.
  • step 2: Try drawing rectangle by choosing the rectangle option from the control.
  • step 3: Click on a point and try dragging the cursor to create a rectangle.

What behaviour I'm expecting and which behaviour I'm seeing

Expectation: I should've been able to create a rectangle by clicking and dragging the cursor.
Observation: We're unable to drag the cursor to create a rectangle.

Minimal example reproducing the issue

  • this example is as simple as possible
  • this example does not rely on any third party code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions