As title. Because of the requests of my GIS project, I need to make the buttons of mapbox.com draw tools shown in a DIV, to make the DIV look like one of my created toolboxes. I've searched on Google using "mapbox.com draw tool in another div " or "mapbox.com draw tool show in a div" , but the results aren't suitable for my needs. If it is possible, may someone guide me to reach it?
I've thought to copy the outerHTML of the buttons in the generated draw tool and append to the target DIV....
$(".mapbox-gl-draw_ctrl-draw-btn").each(function(){
$("#myTargetDIV")[0].innerHTML+=$(this)[0].outerHTML;
});
The buttons are shown in the target DIV but nothing happens when I pressed them.