How do I change the default cursor in leaflet maps?

前端 未结 6 2014
独厮守ぢ
独厮守ぢ 2020-12-14 17:02

I am trying to modify the default cursor icon when a certain control button is pressed. Although I was partially successful by using css on the container div, doing this ove

6条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-14 17:37

    Set to crosshair:

    document.getElementById('map').style.cursor = 'crosshair'
    

    Reset it back:

    document.getElementById('map').style.cursor = ''
    

提交回复
热议问题