i want create following icon marker to mouse when i choose place (gif)
How do i write this
JS
let objectType = document.getElementById('cursor');
document.onmousemove = function(event){
objectType.style.left = event.clientX+'px';
objectType.style.top = event.clientY+'px';
}
HTML + CSS
<img src="/public/images/icon/obj.png" id="cursor" class="cursor"/>
.cursor {
position: fixed;
visibility: hidden;
}
But this does not allow you to click on the map and it is superimposed on the interface
How to do it better?