Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

213
Vistas
Create custom buttons in a dialog box for Save and Cancel when using Leaflet.draw

I am working on a project in React and making use of the leaflet and leaflet.draw libraries.

I would like to replicate the functionality of the Save and Cancel buttons in a dialog box.

What I have: Current Save and Cancel Buttons

Q1. What I want: Save and Cancel Buttons in a Dialog Box

So, OK and Cancel in the dialog box should be equivalent to Save and Cancel in the toolbar options respectively.

The idea is that, after I click on the delete button in the toolbar, I click on a polygon to be deleted. Then a dialog box appears asking me to confirm my request.

Q2. For such a dialog box to appear, which event should I use here? Will map.on(draw:deletestart work)?

If I click on OK, the polygon should then be deleted.

Else, when I click on Cancel, the polygon should stay as it was.

Please let me know if anything is not clear or any extra information is required.

Many thanks in advance!

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda