I use asynchronous component loading to avoid load extra code if editing is not require. In current version of PM, if the leaflet map has already been initialized, the editor will not work in the usual way of initializing.
For myself, I decided in this way:
const pm = new (L.PM as any).Map(map);
map.pm = pm;
it would be great to have PM method to properly set the editor to an already initialized map.
For example:
L.PM.addTo(map)
and also be great to import such a method directly from the library
import setup from '@geoman-io/leaflet-geoman-free';
setup(leafltMap);
if such library development is acceptable, I am ready to prepare the PR after discussing
Hello!
I use asynchronous component loading to avoid load extra code if editing is not require. In current version of PM, if the leaflet map has already been initialized, the editor will not work in the usual way of initializing. For myself, I decided in this way:
it would be great to have PM method to properly set the editor to an already initialized map. For example:
and also be great to import such a method directly from the library
if such library development is acceptable, I am ready to prepare the PR after discussing