Closed Coding-Journey-Studio closed 7 months ago
Assuming that you are wanting to change the tooltip on the drawMarker button? The documentation for this is here: https://www.geoman.io/docs/customize/language
The link to the english translation file is broken, but you can find your various options for strings in the Translations Class at: https://github.com/geoman-io/leaflet-geoman/blob/b8b56e785deea901b94f2d8d683c70130f66327b/leaflet-geoman.d.ts#L581
I think what you want to do is something like the following:
this.customTranslation = { buttonTitles: { drawMarkerButton: 'Your custom text' } };
and
this.map.pm.setLang('customName', this.customTranslation, 'en' );
I'm also a bit confused here. With
map.pm.setGlobalOptions({
tooltips: false
});
i still have the tiptools as a mouseover on the toolbar. The tooltips in the map are off as expected. In my case, I want to change the text 'Drag Layers' apearing as mouse over on the Drag tool, but all my tries failed. Is there a hint for me?
For those who found this thread with the same question. Just host geoman.js local and edit the source...
@CptHolzschnauz you can overwrite the tooltip of the control with the same way as @matthewtboyle described, just overwrite the other key: https://github.com/geoman-io/leaflet-geoman/blob/20df292812c207cab3990e58400ec54868c29d8e/src/assets/translations/en.json#L26
this.customTranslation = { buttonTitles: { dragButton: 'Your custom text' } };
this.map.pm.setLang('customName', this.customTranslation, 'en' );
Forgive me for not finding the relevant documents. How to change the title description of drawMarker