Closed arshdoda closed 3 years ago
You can remove it like that:
map.pm.addControls({
custom: false
})
And showing it again with:
map.pm.addControls({
custom: true
})
map.pm.addControls({ custom: false })
Not Working
Look into this example: https://jsfiddle.net/falkedesign/pk2jyg71/
It should work.
Change between custom: false
and custom: true
Look into this example: https://jsfiddle.net/falkedesign/pk2jyg71/
It should work.
Change between
custom: false
andcustom: true
Still not working. May be issue with npm package
In the demo it is working how you expecting?
Do you use the latest version of Geoman 2.9.0 and Leaflet 1.7.1?
Yes, i am using the latest ones
You also use the same name as in your shared code? name: custom
You also use the same name as in your shared code?
name: custom
Yes.
I tried locally. Issue with npm package
Hmmm Typescript, vanilla, or which framework you are using?
using reactjs
Can you please create a demo like this: https://codesandbox.io/s/elated-villani-q0gei?file=/src/map/MapWithGeoman.tsx
I have a similar issue with #796
Hi,
I want to show the custom button if layer geometry is "polygon" and remove if layer geometry is "linestring"
Is there any function to remove the customButton.
I tried following: