geoman-io / leaflet-geoman

🍂🗺️ The most powerful leaflet plugin for drawing and editing geometry layers
https://geoman.io
MIT License
2.19k stars 431 forks source link

Start vertex on center map when active tool polyline and polygon #1233

Closed BlackNg11 closed 1 year ago

BlackNg11 commented 1 year ago

Hello all.

First of all I want to say geoman is a excellent plugin for leafletjs.

The issue i want to ask:

Thank.

Falke-Design commented 1 year ago

Hi @BlackNg11, can you please share a video what you mean. I don't understand it.

Falke-Design commented 1 year ago

start-marker

I don't know if we want to hide the start marker. The tooltip is a important notifaction. I would also say we should change the rectangle to act like the polygon.

Anyway a workaround for you:

  map.on('pm:drawstart',(e)=>{
    if(e.shape === 'Line' || e.shape === 'Polygon') {
      map.pm.Draw[e.shape]._hintMarker.setLatLng([0, 0]);
    }
  })
Falke-Design commented 1 year ago

With cursorMarker: false you can hide the cursor marker completly. We will not hide it while enabling a draw mode.