Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

326
Views
error del rectángulo delimitador del folleto después de habilitar la edición

Los usuarios pueden ingresar coordenadas en un mapa y luego dibujar en el mapa. Sin embargo, cuando trato de permitir que el usuario edite el rectángulo delimitador agregando rectangle.enableEdit(); Obtiene el siguiente error. "Error: Must add layer to map before using getCenter()" . Si elimino enableEdit, puedo arrastrar el mapa. Pero con habilitarEditar aparece el error. Lo que estoy tratando de lograr es si un usuario ingresa coordenadas o si usa el botón dibujar rectángulo. Estoy tratando de darles las mismas características. Donde pueden cambiar el tamaño del cuadro delimitador y mover el cuadro delimitador.

 function drawRectangle() { if(rectangle) rectangle.remove(map); .... ... var lat_lon = [[north,east],[south,west]]; rectangle = L.rectangle(lat_lon, { draggable: true ,redraw:true}); rectangle.addTo(map); rectangle.enableEdit(); map.fitBounds(rectangle.getBounds()); }

Habilitar folletoEditar error

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!